forked from themosis/theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (39 loc) · 974 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
38
39
40
var webpack = require('webpack'),
path = require('path');
module.exports = {
cache: true,
target: 'web',
entry: {
theme: path.join(__dirname, 'assets/js/theme.js')
},
output: {
path: path.join(__dirname, 'dist/js'),
publicPath: '',
filename: '[name].min.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
]
},
externals: {
jquery: 'jQuery',
backbone: 'Backbone',
underscore: '_'
},
plugins: [
new webpack.ProvidePlugin({
// Automatically detect jQuery and $ as free var in modules
// and inject the jquery library
// This is required by many jquery plugins
jquery: "jQuery",
$: "jQuery",
backbone: "Backbone",
underscore: "_"
})
]
};