webpack.config.js配置var webpack = require(‘webpack’);
var path = require(‘path’);
module.exports={
entry: path.resolve(__dirname, ‘client/views/main.js’),
output:{
path : path.resolve(__dirname, ‘client/build/’),
filename:‘main.min.js’
},
resolve: {
extensions: [’ ', ‘.js’, ‘.vue’, ‘.json’,‘sass’],
//fallback: [path.join(__dirname, ‘…/node_modules’)],
alias: {
‘vue’: path.join(__dirname, ‘node_modules/vue/dist/vue.min.js’)
//‘js’: path.resolve(__dirname, ‘…/js’)
}
},
module: {
loaders: [{
test: /.css$/,
loader: ‘style-loader!css-loader}’
}, {
test: /.scss/,
loader: ‘style-loader!css-loader!sass
...
继续阅读
(4)