webpack is not defined webpack is not defined 只需要在webpack.config.js 文件中加上 let webpack = require('webpack');