cozy-rsvp/webpack.config.js

47 lines
793 B
JavaScript
Raw Normal View History

2016-11-04 20:33:20 +01:00
'use strict'
const path = require('path')
const webpack = require('webpack')
module.exports = {
context: path.join(__dirname, 'app'),
entry: {
app: './index.js'
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
2016-11-04 20:38:35 +01:00
loader: 'babel'
2016-11-04 20:33:20 +01:00
},
{
test: /\.vue$/,
loader: 'vue'
2016-11-07 02:51:21 +01:00
},
{
test: /\.json$/,
loader: 'json'
2016-11-04 20:33:20 +01:00
}
]
},
vue: {
postcss: [
require('autoprefixer')({
browsers: ['last 3 versions']
})
]
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: 'commons',
filename: 'commons.bundle.js',
minChunks: 2
})
]
}