Skip to content

Commit a43ab72

Browse files
committed
feat: overrule module output
1 parent 10a0c5e commit a43ab72

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/child-compiler.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ class HtmlWebpackChildCompiler {
9595
type: 'var',
9696
name: 'HTML_WEBPACK_PLUGIN_RESULT'
9797
},
98-
/** @type {'text/javascript'} */
99-
scriptType: (/** @type {'text/javascript'} */'text/javascript')
98+
scriptType: /** @type {'text/javascript'} */('text/javascript'),
99+
iife: true
100100
};
101101
const compilerName = 'HtmlWebpackCompiler';
102102
// Create an additional child compiler which takes the template
@@ -152,9 +152,6 @@ class HtmlWebpackChildCompiler {
152152
if (childCompilation && childCompilation.errors && childCompilation.errors.length) {
153153
const errorDetails = childCompilation.errors.map(error => {
154154
let message = error.message;
155-
if ('error' in error) {
156-
message += ':\n' + error.error;
157-
}
158155
if (error.stack) {
159156
message += '\n' + error.stack;
160157
}

0 commit comments

Comments
 (0)