From 136dba5257459070d363ad6ddc1334d1298ab38a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 10 Jul 2026 12:07:24 +0200 Subject: [PATCH] Add security config user-checker and change config webpack.config.js --- config/packages/security.yaml | 1 + webpack.config.js | 29 ++++++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 1955618..cc77104 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -49,6 +49,7 @@ security: path: /logout switch_user: true # end of lines added by chill-bundles recipe + user_checker: chill_security.user_checker # Easy way to control access for large sections of your site # Note: Only the *first* access control that matches will be used diff --git a/webpack.config.js b/webpack.config.js index e02a23d..d78a693 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -94,19 +94,26 @@ module.exports = (async () => { Encore .setOutputPath('public/build/') .setPublicPath('/build') - .enableSassLoader() + .enableSassLoader(function (options) { + // If set to true, Sass won’t print warnings that are caused by dependencies (like bootstrap): + // https://sass-lang.com/documentation/js-api/interfaces/options/#quietDeps + options.sassOptions.quietDeps = true; + options.sassOptions.silenceDeprecations = ['import']; + }) .enableVueLoader(() => {}, { version: 3, - runtimeCompilerBuild: true, }) - .enableTypeScriptLoader(/*function (tsConfig){ - tsConfig.appendTsSuffixTo = [/\.vue$/]; - tsConfig.appendTsxSuffixTo = [/\.vue$/]; - // temporary fix for https://github.com/vuejs/vue-loader/issues/1915 and https://github.com/vuejs/core/issues/2855 - tsConfig.compilerOptions = {strict: !Encore.isProduction()}; - tsConfig.compilerOptions.paths = {"translator": [resolve(__dirname, "./assets/translator.ts")]}; - tsConfig.silent = false; - }*/) + .enableTypeScriptLoader(function (tsConfig){ + tsConfig.appendTsSuffixTo = [/\.vue$/]; + tsConfig.appendTsxSuffixTo = [/\.vue$/]; + // temporary fix for https://github.com/vuejs/vue-loader/issues/1915 and https://github.com/vuejs/core/issues/2855 + tsConfig.compilerOptions = {strict: !Encore.isProduction()}; + // disable type checking in ts-loader: Vue files are already checked by vue-tsc, + // and the generated code (e.g. mergeModels) may use APIs not yet in the bundled @vue/runtime-core types. + // see https://github.com/vuejs/core/issues/10331#issuecomment-1938909170 + tsConfig.transpileOnly = true; + tsConfig.silent = false; + }) //.enableForkedTypeScriptTypesChecking() .autoProvidejQuery() .enableSourceMaps(!Encore.isProduction()) @@ -129,7 +136,7 @@ module.exports = (async () => { ; Encore.addAliases({ - translator: resolve(__dirname, './vendor/chill-project/chill-bundles/assets/translator') + translator: resolve(__dirname, './vendor/chill-project/chill-bundles/assets/translator'), }); // populate config with chill entries