Webpack:Bundle.js – 未捕获的ReferenceError:进程未定义

这是我的webpack.config.js

"use strict"; module.exports = { entry: ['./main.js'], output: { path: __dirname, filename: 'bundle.js' }, module: { loaders: [ { test: /.js?$/, loader: 'babel-loader', exclude: /node_modules/, query: { presets: ['es2015', 'react'] } }, {test: /\.json$/, loader: "json"}, ] }, externals: { React: 'react', }, target: "node", }; 

Main.js

 import React from 'react'; import ReactDOM from 'react-dom'; import {Table, Column, Cell} from 'fixed-data-table'; import Chart from 'chartjs'; import jQuery from 'jquery'; import vis from 'vis'; import babel from 'babel-core'; 

Bundle.js插入在我的Index.html中。 浏览器然后给出错误:

 Uncaught ReferenceError: process is not defined at Object.measureMethods (bundle.js:1297) at Object.<anonymous> (bundle.js:530) at __webpack_require__ (bundle.js:20) at Object.<anonymous> (bundle.js:288) at __webpack_require__ (bundle.js:20) at Object.<anonymous> (bundle.js:158) at __webpack_require__ (bundle.js:20) at Object.<anonymous> (bundle.js:110) at __webpack_require__ (bundle.js:20) at Object.<anonymous> (bundle.js:90) 

我应该在webpack.config.js中改变这个错误消失吗?

       

网上收集的解决方案 "Webpack:Bundle.js – 未捕获的ReferenceError:进程未定义"