Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 38 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | var Encore = require('@symfony/webpack-encore'); |
||
2 | |||
3 | Encore |
||
4 | .setOutputPath('public/build/') |
||
5 | .setPublicPath('/build') |
||
6 | .cleanupOutputBeforeBuild() |
||
7 | // Convert typescript files. |
||
8 | .enableTypeScriptLoader() |
||
9 | .enableLessLoader() |
||
10 | .addStyleEntry('global', [ |
||
11 | './public/scss/application.scss', |
||
12 | './vendor/surfnet/stepup-bundle/src/Resources/public/less/stepup.less' |
||
13 | ]) |
||
14 | .addEntry('registration-print', './public/typescript/registration-print.ts') |
||
15 | .addEntry('app', [ |
||
16 | './public/typescript/app.ts', |
||
17 | './vendor/surfnet/stepup-bundle/src/Resources/public/js/stepup.js' |
||
18 | ]) |
||
19 | |||
20 | // Convert sass files. |
||
21 | .enableSassLoader(function (options) { |
||
22 | options.sassOptions = { |
||
23 | outputStyle: 'expanded', |
||
24 | includePaths: ['public'], |
||
25 | }; |
||
26 | }) |
||
27 | .addLoader({test: /\.scss$/, loader: 'webpack-import-glob-loader'}) |
||
28 | .configureLoaderRule('eslint', loaderRule => { |
||
29 | loaderRule.test = /\.(jsx?|vue)$/ |
||
30 | }) |
||
31 | .enableSingleRuntimeChunk() |
||
32 | .enableSourceMaps(!Encore.isProduction()) |
||
33 | // enables hashed filenames (e.g. app.abc123.css) |
||
34 | .enableVersioning(Encore.isProduction()) |
||
35 | ; |
||
36 | |||
37 | |||
38 | module.exports = Encore.getWebpackConfig(); |
||
39 |