작성
·
507
3
terser-webpack-plugin사용시에 타입에러가 나서 해결방법 남겨둡니다.
에러메세지>>
TypeError: Cannot read property 'javascript' of undefined
해결>>
package.json에서 terser-webpack-plugin버전을 5점대에서 ^4.2.3 로 바꿈
참고 메세지>>
Hi you are using Webpack 4 and Terser ^5.0.0
. This version of Terser is for Webpack 5, you need to set version "terser-webpack-plugin": "^4.2.3",
in package.json
file
(출처: https://github.com/webpack-contrib/terser-webpack-plugin/issues/335)