mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[Autotag] Add CSS injection auto tag
This commit is contained in:
parent
f3948a0daf
commit
6e73a1eab0
1 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,9 @@ export default (bundleCode) => { // Scans final bundle JS to try and auto-detect
|
|||
const tags = [
|
||||
basicIncludes(bundleCode, 'react'),
|
||||
basicIncludes(bundleCode, 'document', 'DOM'),
|
||||
|
||||
(bundleCode.includes('document.createTextNode') && /document\.createElement\(['"`]style['"`]\)/.test(bundleCode)) ? 'CSS' : '',
|
||||
|
||||
].filter((x) => x !== undefined);
|
||||
|
||||
return tags;
|
||||
|
|
Loading…
Reference in a new issue