小太阳花
2017-06-24 16:44
请教一下,我按你们的意见把path那里做了相应的修改,也运行正确了,为什么项目中的对应目录下没有打包后的js文件呢
path要为绝对路径
/**
* Created by YEHUAJIN on 2017/6/24.
*/
var path = require('path');
var webpack = require('webpack');
var ROOT_PATH = path.resolve(__dirname);
module.exports = {
entry: [
path.resolve(ROOT_PATH, 'src/script/main.js'),
path.resolve(ROOT_PATH, 'src/script/a.js')
],
output: {
path: path.resolve(ROOT_PATH, 'dist/js'),
filename: 'bundle.js'
}
}
webpack深入与实战
86561 学习 · 721 问题
相似问题