-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
67 lines (63 loc) · 1.83 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
58
59
60
61
62
63
64
65
66
67
const Encore = require('@symfony/webpack-encore');
const ModernizrWebpackPlugin = require('modernizr-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
Encore
.setOutputPath('_static/')
.setPublicPath('/_static')
.cleanupOutputBeforeBuild()
.addEntry('js/theme', './assets/js/main.js')
.addStyleEntry('css/theme', './assets/sass/theme.sass')
.addStyleEntry('css/badge_only', './assets/sass/badge_only.sass')
.enableSassLoader()
.autoProvidejQuery()
.enableSourceMaps(!Encore.isProduction());
var config = Encore.getWebpackConfig();
config.plugins = [].concat(config.plugins, [
new CopyWebpackPlugin([
{ from: './assets/favicon', to: 'favicon' },
], {}),
new ModernizrWebpackPlugin({
'feature-detects': [
'applicationcache',
'audio',
'canvas',
'canvastext',
'geolocation',
'hashchange',
'history',
'indexeddb',
'input',
'inputtypes',
'postmessage',
'svg',
'video',
'webgl',
'css/animations',
'css/backgroundsize',
'css/borderimage',
'css/borderradius',
'css/boxshadow',
'css/columns',
'css/flexbox',
'css/fontface',
'css/generatedcontent',
'css/gradients',
'css/hsla',
'css/multiplebgs',
'css/opacity',
'css/reflections',
'css/rgba',
'css/textshadow',
'css/transforms',
'css/transforms3d',
'css/transitions'
],
minify: {
output: {
comments: true,
beautify: true
}
}
})
]);
module.exports = config;