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 ed58144 commit d00e1a7Copy full SHA for d00e1a7
src/index.ts
@@ -3,6 +3,15 @@ import HtmlInlineScriptPlugin from './HtmlInlineScriptPlugin';
3
4
const isHtmlWebpackPluginV4 = 'getHooks' in htmlWebpackPlugin;
5
6
-module.exports = isHtmlWebpackPluginV4
7
- ? HtmlInlineScriptPlugin
8
- : null;
+if (!isHtmlWebpackPluginV4) {
+ // eslint-disable-next-line no-console
+ console.error(
9
+ '\x1b[35m%s \x1b[31m%s\x1b[0m',
10
+ '[html-inline-script-webpack-plugin]',
11
+ 'Please upgrade your webpack to version 4 to use this plugin.'
12
+ );
13
+
14
+ throw new Error('VERSION_INCOMPATIBLE');
15
+}
16
17
+export = HtmlInlineScriptPlugin;
0 commit comments