Skip to content
Advertisement

Webpack: Bundle.js – Uncaught ReferenceError: process is not defined

Here’s my webpack.config.js

JavaScript

And Main.js

JavaScript

The Bundle.js is inserted in my Index.html. The browser then gives the error:

JavaScript

What should I change in the webpack.config.js to make this error go away?

Advertisement

Answer

You need to add a plugin to define your env (in webpack config):

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement