From f8883bed783c031d2644df69cc09a0e06c712f3a Mon Sep 17 00:00:00 2001 From: David Siegfried Date: Fri, 27 Jun 2025 11:03:01 +0200 Subject: change vite-config, re #3333 --- vite.config.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index b9c8d75..d53d630 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,16 +16,17 @@ export default defineConfig(({ mode }) => { rawPlugin({ match: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/, exclude: undefined - }), + }) ], resolve: { alias: { '@': path.resolve(__dirname, 'resources'), - 'jquery-ui': 'jquery-ui', + 'jquery-ui': 'jquery-ui' } }, build: { outDir: 'public/assets', + emptyOutDir: false, rollupOptions: { input: { 'studip-base': path.resolve(__dirname, 'resources/assets/javascripts/entry-base.js'), @@ -33,32 +34,32 @@ export default defineConfig(({ mode }) => { 'studip-wysiwyg': path.resolve(__dirname, 'resources/assets/javascripts/entry-wysiwyg.js'), 'studip-installer': path.resolve(__dirname, 'resources/assets/javascripts/entry-installer.js'), 'print': path.resolve(__dirname, 'resources/assets/stylesheets/print.scss'), - 'accessibility': path.resolve(__dirname, 'resources/assets/stylesheets/highcontrast.scss'), + 'accessibility': path.resolve(__dirname, 'resources/assets/stylesheets/highcontrast.scss') }, external: ['vue', 'vuex'], output: { - entryFileNames: 'javascripts/[name].js', + entryFileNames: info => info.name.includes('entry-') ? 'javascripts/[name].js' : 'stylesheets/[name].js', chunkFileNames: 'javascripts/[name].chunk.js?h=[hash]', assetFileNames: assetInfo => { if (assetInfo.name?.endsWith('.css')) { return 'stylesheets/[name][extname]'; } return '[name][extname]'; - }, + } } }, - sourcemap: mode !== 'production', + sourcemap: mode !== 'production' }, css: { postcss: './postcss.config.js', preprocessorOptions: { - scss: {}, + scss: {} } }, define: { __VUE_OPTIONS_API__: true, __VUE_PROD_DEVTOOLS__: mode !== 'production', - __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: mode !== 'production', + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: mode !== 'production' } }; }); -- cgit v1.0