webpack踩坑记录
npm i babel-loader babel-core babel-preset-es2015 babel-plugin-transform-runtime -D
node_modules\.bin\webpack-dev-server 使用webpack-dev-server 要用反斜杠
webpack.config.js配置文件
const path = require('path');
module.exports = {
entry:'./src/index.js',
output:{
filename:'bundle.js',
path:path.resolve(__dirname,'dist')
},
devServer:{
contentBase:'./dist'
}
}