Last active
April 28, 2017 12:32
-
-
Save marceloch2/1af211541736d9204dea23d2d0ebe739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
module.exports = { | |
entry: { | |
'babel-polyfill' : 'babel-polyfill', | |
app : './resources/assets/js/app.js', | |
vendor: ["vue", "vue-resource", "vue-strap", "lodash", "moment", "vue-lazyload"], | |
}, | |
output : { | |
filename : "public/js/[name].js", | |
}, | |
plugins : [ | |
new webpack.optimize.CommonsChunkPlugin( { | |
names : ['vendor'], | |
filename : 'public/js/vendor.js', | |
minChunks : Infinity | |
}) | |
], | |
module: { | |
rules: [ | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader', | |
options: { | |
loaders: { | |
} | |
// other vue-loader options go here | |
} | |
}, | |
{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/ | |
}, | |
{ | |
test: /\.(png|jpg|gif|svg)$/, | |
loader: 'file-loader', | |
options: { | |
name: '[name].[ext]?[hash]' | |
} | |
} | |
] | |
}, | |
resolve: { | |
alias: { | |
'vue$': 'vue/dist/vue.esm.js' | |
} | |
}, | |
devtool: '#eval' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment