Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 33 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | var Encore = require('@symfony/webpack-encore') |
||
2 | |||
3 | Encore |
||
4 | // the project directory where all compiled assets will be stored |
||
5 | .setOutputPath('public/build/') |
||
6 | |||
7 | // the public path used by the web server to access the previous directory |
||
8 | .setPublicPath('/build') |
||
9 | |||
10 | // will create public/build/app.js and public/build/app.css |
||
11 | .addEntry('app', './assets/app.js') |
||
12 | .addEntry('polyfill', './assets/polyfill.js') |
||
13 | .addEntry('total-selected-charges', './assets/total-selected-charges.js') |
||
14 | .addEntry('alert', './assets/alert.js') |
||
15 | |||
16 | .configureBabel(babelConfig => { |
||
17 | babelConfig.presets.push('stage-0') |
||
18 | babelConfig.presets.push('react') |
||
19 | }) |
||
20 | |||
21 | .enablePostCssLoader() |
||
22 | |||
23 | // enable source maps during development |
||
24 | .enableSourceMaps(!Encore.isProduction()) |
||
25 | |||
26 | // empty the outputPath dir before each build |
||
27 | .cleanupOutputBeforeBuild() |
||
28 | |||
29 | // show OS notifications when builds finish/fail |
||
30 | .enableBuildNotifications() |
||
31 | |||
32 | // export the final configuration |
||
33 | module.exports = Encore.getWebpackConfig() |
||
34 |