Add browser build

This commit is contained in:
Jakub Juszczak
2017-03-17 15:41:58 +01:00
parent 6913312be9
commit e2a8f3ca3c
3 changed files with 23 additions and 3 deletions

View File

@@ -12,7 +12,8 @@ module.exports = {
output: {
filename: './dist/[name].js',
library: 'VueChartJs',
libraryTarget: 'umd'
libraryTarget: 'umd',
umdNamedDefine: true
},
module: {
preLoaders: [

18
build/webpack.release.min.js vendored Normal file
View File

@@ -0,0 +1,18 @@
var config = require('./webpack.release.js')
var webpack = require('webpack')
config.output.filename = config.output.filename.replace(/\.js$/, '.min.js')
delete config.devtool
config.plugins = [
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
]
module.exports = config