@ types / html-webpack-plugin no admite los tipos de webpack 5 que ahora son generados por el propio 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
y tuve problemas.Definitions by:
en index.d.ts
) para que puedan responder.Si no menciona a los autores, se ignorará el problema.
Instale html-webpack-plugin@next
para que sea compatible con webpack @ 5 que incluye la definición de tipo en sí.
el último html-webpack-plugin
(v4.5.0) ya tiene su propia definición de tipo y ya es compatible con el paquete web 5. No es necesario instalar @types/html-webpack-plugin
Encuentro el mismo problema con webpack5 y ts, ¿has resuelto este problema?
Comentario más útil
el último
html-webpack-plugin
(v4.5.0) ya tiene su propia definición de tipo y ya es compatible con el paquete web 5. No es necesario instalar@types/html-webpack-plugin