-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
54 lines (53 loc) · 2.09 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: {
'vendor': ['jquery'],
'app-theme': './themes/bitix/static/assets/js/app-theme.js',
'app': './static/assets/js/app.js'
},
output: {
path: path.resolve(__dirname, 'static/assets/js/bundle/'),
filename: '[name].bundle.js'
},
resolve: {
extensions: ['.js'],
alias: {
'jquery': path.resolve(__dirname, 'themes/bitix/static/assets/libs/jquery-3.2.1.slim.min.js'),
'popper': path.resolve(__dirname, 'themes/bitix/static/assets/libs/popper.js-1.12.3/popper.min.js'),
'bootstrap': path.resolve(__dirname, 'themes/bitix/static/assets/libs/bootstrap-4.0.0-beta/js/bootstrap.min.js'),
'blueimp-helper': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-helper.js'),
'blueimp-gallery': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery.min.js'),
'./blueimp-gallery': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery.min.js'),
'blueimp-gallery-indicator': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery-indicator.js'),
'blueimp-gallery-video': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery-video.js'),
'blueimp-gallery-vimeo': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery-vimeo.js'),
'blueimp-gallery-youtube': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/blueimp-gallery-youtube.js'),
'jquery-blueimp-gallery': path.resolve(__dirname, 'themes/bitix/static/assets/libs/Gallery-2.25.2/js/jquery.blueimp-gallery.min.js')
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}
]
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
Popper: 'popper'
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor'
})
]
}