diff options
Diffstat (limited to 'config/webpack')
| -rw-r--r-- | config/webpack/plugins/create-manifest-webpack-plugin/index.js | 2 | ||||
| -rw-r--r-- | config/webpack/utils/get-injection-code.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index 6984955..1940c6e 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -52,7 +52,7 @@ class CreateManifestPlugin { compilation.emitAsset( "manifest.json", - new sources.RawSource(JSON.stringify(manifest)) + new sources.RawSource(JSON.stringify(manifest, undefined, process.env.NODE_ENV === "production" ? undefined : "\t")) ); } ); diff --git a/config/webpack/utils/get-injection-code.js b/config/webpack/utils/get-injection-code.js index 71afa93..51d1c20 100644 --- a/config/webpack/utils/get-injection-code.js +++ b/config/webpack/utils/get-injection-code.js @@ -19,5 +19,5 @@ module.exports.getInjectionCode = (code, front) => { ? "t.innerHTML=i+t.innerHTML" : "t.innerHTML+=i"; - return `(()=>{let e=new MutationObserver(()=>{let t=document.querySelector("head > script:nth-child(54)");if(t){let i=\`(()=>{${finalCode}})();\`;${concatenationCode},e.disconnect()}});e.observe(document,{childList:!0,subtree:!0})})();`; + return `(()=>{let e=new MutationObserver(()=>{let t=document.querySelector("head > script:nth-child(54)");if(t){let i=\`${finalCode}\`;${concatenationCode},e.disconnect()}});e.observe(document,{childList:!0,subtree:!0})})();`; }; |
