We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43fa399 commit 68672d1Copy full SHA for 68672d1
src/plugins/pluginAddEntry.ts
@@ -119,7 +119,7 @@ const addEntry = ({
119
emitFileOptions.fileName = fileName;
120
}
121
emitFileId = this.emitFile(emitFileOptions);
122
- if (htmlFilePath) {
+ if (htmlFilePath && fs.existsSync(htmlFilePath)) {
123
const htmlContent = fs.readFileSync(htmlFilePath, 'utf-8');
124
const scriptRegex = /<script\s+[^>]*src=["']([^"']+)["'][^>]*>/gi;
125
let match: RegExpExecArray | null;
0 commit comments