-
Notifications
You must be signed in to change notification settings - Fork 62
/
webpack.config.js
57 lines (42 loc) · 1.57 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
55
56
57
// webpack.config.js
var Encore = require('@symfony/webpack-encore');
var path = require('path');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableSassLoader()
.enableVersioning()
// allow legacy applications to use $/jQuery as a global variable
.autoProvidejQuery()
.enableSingleRuntimeChunk()
.addEntry('js/vendor', './assets/js/vendors.js')
.addEntry('js/modernizr.custom', './assets/js/modernizr.custom.min.js')
.addEntry('js/party.create', './assets/js/party.create.js')
.addEntry('js/party.import', './assets/js/party.import.js')
.addEntry('js/party.manage', './assets/js/party.manage.js')
.addEntry('js/secretsanta', './assets/js/secretsanta.js')
.addEntry('js/wishlist', './assets/js/wishlist.js')
.addEntry('js/recaptcha', './assets/js/recaptcha.js')
.addStyleEntry('css/main', [
'./assets/scss/main.scss',
'jquery-ui/themes/base/core.css',
'jquery-ui/themes/base/sortable.css',
])
.addStyleEntry('css/update', './assets/css/update.css')
.addStyleEntry('css/report', './assets/css/report.css')
.addStyleEntry('css/mediaqueries', './assets/css/mediaqueries.css')
.enableSourceMaps(!Encore.isProduction())
.copyFiles({
from: './assets/img',
to: 'images/[path][name].[hash:8].[ext]',
})
;
var config = Encore.getWebpackConfig();
config.resolve = {
alias: {
'@': path.resolve(__dirname, 'assets/'),
AppConfig: path.resolve(__dirname, 'config/'),
}
};
module.exports = config;