-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwebpack.config.js
36 lines (33 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
'use strict';
const Encore = require('@symfony/webpack-encore');
const merge = require('webpack-merge');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableLessLoader()
.enableSourceMaps(!Encore.isProduction())
.addStyleEntry('red', './assets/less/main.less')
.addStyleEntry('night', './assets/less/main-night.less')
.createSharedEntry('vendor', [
'babel-polyfill',
'bazinga-translator',
'date-fns/distance_in_words',
'date-fns/distance_in_words_to_now',
'date-fns/is_before',
'jquery',
'lodash.debounce',
])
.addEntry('main', './assets/js/main.js')
.configureBabel(babelConfig => {
babelConfig.presets.push(['es2015', { modules: false }]);
babelConfig.plugins = ['syntax-dynamic-import'];
})
.enableVueLoader()
//.enableVersioning()
;
module.exports = merge(Encore.getWebpackConfig(), {
externals: {
"fosjsrouting": "Routing"
},
});