-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
37 lines (35 loc) · 912 Bytes
/
webpack.config.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
31
32
33
34
35
36
37
var path = require("path");
var webpack = require("webpack");
var config = {
entry: {
"ui-router-marionette": ["./src/index.coffee"],
"ui-router-marionette.min": ["./src/index.coffee"]
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
libraryTarget: "umd",
library: "UIRouterMarionette",
umdNamedDefine: true
},
resolve: {
extensions: ["", ".coffee", ".js"]
},
devtool: 'source-map',
plugins: [
new webpack.optimize.UglifyJsPlugin({
minimize: true,
include: /\.min\.js$/,
})
],
module: {
loaders: [
{ test: /\.coffee$/, loader: "coffee-loader" }
]
},
externals: {
"backbone.marionette": { root: 'Marionette', amd: 'backbone.marionette', commonjs2: 'backbone.marionette', commonjs: 'backbone.marionette' },
"underscore": { root: '_', amd: 'underscore', commonjs2: 'underscore', commonjs: 'underscore' }
}
};
module.exports = config;