update webpack config

update webpack config
This commit is contained in:
梁灏 2017-03-01 11:35:00 +08:00
parent 36fa7c6c18
commit 9e74a856f6
5 changed files with 140 additions and 154 deletions

View file

@ -22,29 +22,24 @@ module.exports = {
}
},
resolve: {
extensions: ['', '.js', '.vue']
extensions: ['.js', '.vue']
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
}, {
test: /\.css$/,
loader: 'style!css!autoprefixer'
}, {
test: /\.less$/,
loader: 'style!css!less'
}, {
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
loader: 'url?limit=8192'
}, {
test: /\.(html|tpl)$/,
loader: 'vue-html'
}]
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
postLoaders: {
html: 'babel-loader'
}
}
},
{
test: /\.js$/,
loader: 'babel-loader', exclude: /node_modules/
}
]
},
plugins: [
new webpack.DefinePlugin({