forked from AdventureLookup/AdventureLookup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
32 lines (28 loc) · 1.02 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
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('web/assets/')
.setPublicPath('/assets')
.cleanupOutputBeforeBuild()
.addEntry('app', './app/Resources/webpack/index.js')
.createSharedEntry('vendor', [
'jquery',
'bootstrap',
// TODO: Including the Bootstrap css here duplicates it for some reason, although the docs indicate otherwise:
// https://symfony.com/doc/current/frontend/encore/shared-entry.html
// If you make it work, don't forget to include the vendor css in the base.html.twig layout:
// <link rel="stylesheet" href="{{ asset('assets/vendor.css') }}" />
//'bootstrap/scss/bootstrap',
'toastr',
'selectize',
'vanilla-lazyload',
])
.enableSassLoader()
.enablePostCssLoader()
.autoProvidejQuery()
.autoProvideVariables({
'Tether': 'tether',
})
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
;
module.exports = Encore.getWebpackConfig();