forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (35 loc) · 1.01 KB
/
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');
configuration = {
entry: {
dashboard: './saleor/static/js_src/dashboard.jsx',
storefront: './saleor/static/js_src/storefront.jsx',
},
output: {
filename: './saleor/static/js/[name].js'
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"},
{test: /\.json$/, loader: 'json'},
//{test: require.resolve("jquery"), loader: "expose?jQueryDebug"}
]
},
resolve: {
extensions: ['', '.jsx', '.js']
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
'_': 'underscore',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Backbone: 'backbone',
'window.Backbone': 'backbone',
Hammer: 'hammerjs'
}),
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.DedupePlugin()
]
};
module.exports = configuration