Browse Source

fix: prevent occasional FOUC (#663)

tophf 6 years ago
parent
commit
78fe8ecd5d
1 changed files with 1 additions and 6 deletions
  1. 1 6
      scripts/plaid.conf.js

+ 1 - 6
scripts/plaid.conf.js

@@ -7,12 +7,7 @@ const { isProd } = require('@gera2ld/plaid/util');
  * - value.html.inlineSource: if true, JS and CSS files will be inlined in HTML.
  */
 const injectTo = item => {
-  if ([
-    '../browser.js',
-    '../common.js',
-  ].includes(item.attributes.src)) {
-    return 'head';
-  }
+  if (!(item.attributes.src || '').endsWith('/index.js')) return 'head';
 };
 const htmlFactory = extra => options => ({
   ...options,