You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 27, 2021. It is now read-only.
const commonConfig: Configuration = {
......
......
plugins: [
new WebpackBar({
name: 'Project',
// react blue
color: '#61dafb',
}),
new FriendlyErrorsPlugin(),
new HtmlWebpackPlugin({
minify: __DEV__ ? false : htmlMiniFierOptions,
cache: false,
template: path.resolve(PROJECT_ROOT, './public/index.html')
}),
// new HardSourceWebpackPlugin()
]
}
Got this error:
error TS2322: Type 'FriendlyErrorsWebpackPlugin' is not assignable to type '((this: Compiler, compiler: Compiler) => void) | WebpackPluginInstance'.
Type 'FriendlyErrorsWebpackPlugin' is not assignable to type 'WebpackPluginInstance'.
Types of property 'apply' are incompatible.
Type '(compiler: import("/Users/liyiming22/ts-react/node_modules/@types/friendly-errors-webpack-plugin/node_modules/@types/webpack/index").Compiler) => void' is not assignable to type '(compiler: import("/Users/liyiming22/ts-react/node_modules/webpack/types").Compiler) => void'.
Types of parameters 'compiler' and 'compiler' are incompatible.
Property '_pluginCompat' is missing in type 'import("/Users/liyiming22/ts-react/node_modules/webpack/types").Compiler' but required in type 'import("/Users/liyiming22/ts-react/node_modules/@types/friendly-errors-webpack-plugin/node_modules/@types/webpack/index").Compiler'.
116 new FriendlyErrorsPlugin(),
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@types/friendly-errors-webpack-plugin/node_modules/@types/webpack/index.d.ts:1466:9
1466 _pluginCompat: SyncBailHook<compilation.Compilation>;
~~~~~~~~~~~~~
'_pluginCompat' is declared here.