[Autotag] Add CSS injection auto tag
This commit is contained in:
parent
f3948a0daf
commit
6e73a1eab0
|
@ -7,6 +7,9 @@ export default (bundleCode) => { // Scans final bundle JS to try and auto-detect
|
||||||
const tags = [
|
const tags = [
|
||||||
basicIncludes(bundleCode, 'react'),
|
basicIncludes(bundleCode, 'react'),
|
||||||
basicIncludes(bundleCode, 'document', 'DOM'),
|
basicIncludes(bundleCode, 'document', 'DOM'),
|
||||||
|
|
||||||
|
(bundleCode.includes('document.createTextNode') && /document\.createElement\(['"`]style['"`]\)/.test(bundleCode)) ? 'CSS' : '',
|
||||||
|
|
||||||
].filter((x) => x !== undefined);
|
].filter((x) => x !== undefined);
|
||||||
|
|
||||||
return tags;
|
return tags;
|
||||||
|
|
Loading…
Reference in New Issue