vaderjs 1.3.3-alpha-65 → 1.3.3-alpha-67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vader.js +2 -4
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -652,10 +652,7 @@ function Compiler(func, file) {
|
|
|
652
652
|
let html = fs.existsSync(process.cwd() + '/dist/index.html') ? fs.readFileSync(process.cwd() + '/dist/index.html', 'utf8') : ''
|
|
653
653
|
if (!html.includes(`<link rel="preload" href="${path.replace(/'/g, '').trim()}" as="${path.replace(/'/g, '').trim().includes('.css') ? 'style' : 'script'}">`)
|
|
654
654
|
&& !path.includes('.module.css')
|
|
655
|
-
) {
|
|
656
|
-
if (!html.includes(`</head>`)) {
|
|
657
|
-
throw new Error('Could not find </head> in index.html')
|
|
658
|
-
}
|
|
655
|
+
) {
|
|
659
656
|
let preload = `${!path.trim().includes('.css') ? `<link rel="modulepreload" href="${path.trim()}">` : ''}<link rel="preload" href="${path.trim()}" as="${path.trim().includes('.css') ? 'style' : 'script'}">`
|
|
660
657
|
html = html.replace('</head>', `${preload}\n</head>`)
|
|
661
658
|
|
|
@@ -884,6 +881,7 @@ async function Build() {
|
|
|
884
881
|
}
|
|
885
882
|
bundleSize += fs.statSync(process.cwd() + "/runtime/" + file).size;
|
|
886
883
|
let data = await reader(process.cwd() + "/runtime/" + file)
|
|
884
|
+
console.log(process.cwd() + "/runtime/" + file)
|
|
887
885
|
await writer(process.cwd() + "/dist/" + file, data);
|
|
888
886
|
});
|
|
889
887
|
|