forked from timekit-io/booking-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.min.js
30 lines (28 loc) · 919 Bytes
/
webpack.config.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict';
var webpack = require('webpack');
module.exports = {
entry: './src/main.js',
output: {
path: './dist',
filename: 'booking.min.js',
libraryTarget: 'umd',
library: 'TimekitBooking'
},
externals: {
'jquery': 'jQuery'
},
module: {
loaders: [
{ test: /\.html$/, loader: 'mustache?noShortcut' },
{ test: /\.css$/, loaders: ['style?singleton', 'css?minimize', 'autoprefixer'] },
{ test: /\.scss$/, loaders: ['style?singleton', 'css?minimize', 'autoprefixer', 'sass'] },
{ test: /\.svg$/, loader: 'svg-inline' }
]
},
plugins: [
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /en-gb/),
new webpack.optimize.UglifyJsPlugin({minimize: true}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin()
]
};