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
@types/html-webpack-plugin doesn't support webpack 5 types which are now generated by webpack itself.
node_modules/@types/html-webpack-plugin/index.d.ts:9:10 - error TS2305: Module '"../../webpack/types"' has no exported member 'Plugin'.
9 import { Plugin, compilation, Compiler } from 'webpack';
~~~~~~
node_modules/@types/html-webpack-plugin/index.d.ts:9:18 - error TS2724: Module '"../../webpack/types"' has no exported member 'compilation'. Did you mean 'Compilation'?
9 import { Plugin, compilation, Compiler } from 'webpack';
~~~~~~~~~~~
I tried using the @types/html-webpack-plugin package and had problems.
I had the same issue even with the html-webpack-plugin (v4.5.0.) In my case, I changed just the typings.d.ts:
This import { Compiler, compilation } from 'webpack';
to this: import { Compiler, Compilation } from 'webpack';
and static getHooks(compilation: compilation.Compilation): HtmlWebpackPlugin.Hooks;
to static getHooks(compilation: Compilation): HtmlWebpackPlugin.Hooks;
I am not sure if this is the intended behavior though. Thanks.
@types/html-webpack-plugin doesn't support webpack 5 types which are now generated by webpack itself.
@types/html-webpack-plugin
package and had problems.Definitions by:
inindex.d.ts
) so they can respond.If you do not mention the authors the issue will be ignored.
The text was updated successfully, but these errors were encountered: