| Total Complexity | 3 |
| Complexity/F | 1.5 |
| Lines of Code | 35 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | const Encore = require('@symfony/webpack-encore'); |
||
| 2 | |||
| 3 | if (!Encore.isRuntimeEnvironmentConfigured()) { |
||
| 4 | Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev'); |
||
| 5 | } |
||
| 6 | |||
| 7 | Encore |
||
| 8 | .setOutputPath('public/build/') |
||
| 9 | .setPublicPath('/build') |
||
| 10 | .addEntry('app', './assets/js/app.js') |
||
| 11 | .addEntry('homepage', './assets/js/pages/homepage.js') |
||
| 12 | .addEntry('properties', './assets/js/pages/properties.js') |
||
| 13 | .splitEntryChunks() |
||
| 14 | .enableSingleRuntimeChunk() |
||
| 15 | .cleanupOutputBeforeBuild() |
||
| 16 | .enableBuildNotifications() |
||
| 17 | .enableSourceMaps(!Encore.isProduction()) |
||
| 18 | .enableVersioning(Encore.isProduction()) |
||
| 19 | .configureBabel((config) => { |
||
| 20 | config.plugins.push('@babel/plugin-proposal-class-properties'); |
||
| 21 | }) |
||
| 22 | .configureBabelPresetEnv((config) => { |
||
| 23 | config.useBuiltIns = 'usage'; |
||
| 24 | config.corejs = 3; |
||
| 25 | }) |
||
| 26 | .enableSassLoader() |
||
| 27 | .copyFiles({ |
||
| 28 | from: './assets/images', |
||
| 29 | to: 'images/[path][name].[hash:8].[ext]' |
||
| 30 | }) |
||
| 31 | .enableIntegrityHashes(Encore.isProduction()) |
||
| 32 | .autoProvidejQuery() |
||
| 33 | ; |
||
| 34 | |||
| 35 | module.exports = Encore.getWebpackConfig(); |
||
| 36 |