강의

멘토링

로드맵

Understanding and Practice of Frontend Development Environment (webpack, babel, eslint..)

I can understand pre-existing development environments. I can create a development environment from scratch.

(4.9) 216 reviews

3,041 learners

Level Intermediate

Course period Unlimited

Node.js
Node.js
Webpack
Webpack
Babel
Babel
ESLint
ESLint
Node.js
Node.js
Webpack
Webpack
Babel
Babel
ESLint
ESLint

Here's how to fix terser-webpack-plugin errors.

This lecture uses Webpack version 4, but recently it has been majorly updated to version 5. Plugins related to Webpack are also released as updated versions for compatibility, and among them, terser-webpack-plugin used in the lecture has been updated from 4 to 5. Some of you may have encountered error messages because of this, so please refer to the method shared by "쭁" below.

Error message

  • "TypeError: Cannot read property 'javascript' of undefined"
  • 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

How to solve

  • In package.json, change the terser-webpack-plugin version from 5 to ^4.2.3 Change to

Source: https://www.inflearn.com/questions/86666

Comment