More than TIL/Bundlers

Uncaught ReferenceError: process is not defined (Webpack)

코디번 KodeVvon 2022. 5. 7. 21:53

Uncaught ReferenceError: process is not defined

solution

1. npm i process

  • install process

2. add plugin setting in webpack.config.js

const webpack = require('webpack')
  ...
module.exports = {
  ...
  plugin:[
    ...
    new webpack.ProvidePlugin({
      process: 'process/browser',
    })
  ]
}