@ types / html-webpack-plugin não suporta webpack 5 tipos que agora são gerados pelo próprio webpack.
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';
~~~~~~~~~~~
@types/html-webpack-plugin
e tive problemas.Definitions by:
em index.d.ts
) para que eles possam responder.Se você não mencionar os autores, o problema será ignorado.
Instale html-webpack-plugin@next
para compatível com webpack @ 5 que inclui a própria definição de tipo.
mais recente html-webpack-plugin
(v4.5.0) já tem sua própria definição de tipo e já suporta webpack 5. Não há necessidade de instalar @types/html-webpack-plugin
eu encontro o mesmo problema com webpack5 e ts, você já resolveu este problema?
Comentários muito úteis
mais recente
html-webpack-plugin
(v4.5.0) já tem sua própria definição de tipo e já suporta webpack 5. Não há necessidade de instalar@types/html-webpack-plugin