snappymail/webpack.config.js

50 lines
1.3 KiB
JavaScript
Raw Normal View History

2014-09-05 06:49:03 +08:00
var webpack = require('webpack');
module.exports = {
entry: {
'app': __dirname + '/dev/app.js',
'admin': __dirname + '/dev/admin.js'
2014-09-05 06:49:03 +08:00
},
output: {
pathinfo: true,
path: __dirname + '/rainloop/v/0.0.0/static/js/',
filename: '[name].js',
publicPath: 'rainloop/v/0.0.0/static/js/',
chunkFilename: '[chunkhash].subapp.js'
2014-09-05 06:49:03 +08:00
},
// devtool: "#source-map",
2014-09-05 06:49:03 +08:00
plugins: [
2014-10-29 06:05:50 +08:00
// new webpack.optimize.CommonsChunkPlugin('common.js'),
2014-09-05 07:22:39 +08:00
new webpack.optimize.OccurenceOrderPlugin()
2014-09-05 06:49:03 +08:00
],
resolve: {
modulesDirectories: [__dirname + '/dev/'],
extensions: ['', '.js'],
alias: {
"Opentip": __dirname + "/dev/External/Opentip.js",
"ko": __dirname + "/dev/External/ko.js"
2014-09-05 06:49:03 +08:00
}
},
externals: {
'window': 'window',
2015-01-06 04:55:06 +08:00
'JSON': 'window.JSON',
2014-09-19 23:24:38 +08:00
'JSEncrypt': 'window.JSEncrypt',
'$LAB': 'window.$LAB',
'progressJs': 'window.rainloopProgressJs',
'PhotoSwipe': 'window.PhotoSwipe',
'PhotoSwipeUI_Default': 'window.PhotoSwipeUI_Default',
'queue': 'window.queue',
2015-01-06 04:55:06 +08:00
'moment': 'window.moment',
'ifvisible': 'window.ifvisible',
'crossroads': 'window.crossroads',
'hasher': 'window.hasher',
'Jua': 'window.Jua',
'Autolinker': 'window.Autolinker',
'Tinycon': 'window.Tinycon',
2015-01-06 04:55:06 +08:00
'ssm': 'window.ssm',
'key': 'window.key',
'_': 'window._',
'Q': 'window.Q',
2015-01-06 04:55:06 +08:00
'$': 'window.jQuery'
2014-09-05 06:49:03 +08:00
}
};