@types/html-webpack-plugin์ ์ด์ webpack ์์ฒด์์ ์์ฑ๋๋ webpack 5 ์ ํ์ ์ง์ํ์ง ์์ต๋๋ค.
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
ํจํค์ง๋ฅผ ์ฌ์ฉํด ๋ณด์๋๋ฐ ๋ฌธ์ ๊ฐ ์์์ต๋๋ค.Definitions by:
in index.d.ts
)๋ฅผ ํตํด ๋๋ตํ๋ค.์์ฑ์๋ฅผ ์ธ๊ธํ์ง ์์ผ๋ฉด ๋ฌธ์ ๊ฐ ๋ฌด์๋ฉ๋๋ค.
์ ํ ์ ์ ์์ฒด๋ฅผ ํฌํจํ๋ webpack@5 ์ ํธํ๋๋๋ก html-webpack-plugin@next
๋ฅผ ์ค์นํฉ๋๋ค.
์ต์ html-webpack-plugin
(v4.5.0)์๋ ์ด๋ฏธ ์์ฒด ์ ํ ์ ์๊ฐ ์์ผ๋ฉฐ ์ด๋ฏธ ์นํฉ 5๋ฅผ ์ง์ํฉ๋๋ค. @types/html-webpack-plugin
๋ฅผ ์ค์นํ ํ์๊ฐ ์์ต๋๋ค.
webpack5 ๋ฐ ts์์ ๋์ผํ ๋ฌธ์ ๋ฅผ ๋ง๋ฌ์ต๋๋ค. ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ จ์ต๋๊น?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ต์
html-webpack-plugin
(v4.5.0)์๋ ์ด๋ฏธ ์์ฒด ์ ํ ์ ์๊ฐ ์์ผ๋ฉฐ ์ด๋ฏธ ์นํฉ 5๋ฅผ ์ง์ํฉ๋๋ค.@types/html-webpack-plugin
๋ฅผ ์ค์นํ ํ์๊ฐ ์์ต๋๋ค.