From 5f09acd06379a114c48b0bc511eba3635bd229bf Mon Sep 17 00:00:00 2001 From: Diego Pascual Date: Wed, 20 Sep 2023 09:08:47 +0200 Subject: [PATCH] fix path for multi theming --- build/instrumentation.build.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/build/instrumentation.build.js b/build/instrumentation.build.js index 2442ebb1..c2fc89ac 100644 --- a/build/instrumentation.build.js +++ b/build/instrumentation.build.js @@ -14,8 +14,6 @@ import visualizer from 'rollup-plugin-visualizer'; import vue from 'rollup-plugin-vue'; import * as fs from 'fs'; -const jsOutputDirectory = path.join(process.cwd(), 'dist'); - /** * Creates a rollup configuration for projects that use X-Components. This configuration can be customized with the options object. * @@ -49,26 +47,28 @@ export function createConfig({ }; } + const mergedOutput = { + dir: path.join(process.cwd(), 'dist'), + format: 'es', + sourcemap: true, + assetFileNames: '[name][extname]', + entryFileNames: 'app.js', + ...output + }; + return { input, - output: { - dir: jsOutputDirectory, - format: 'es', - sourcemap: true, - assetFileNames: '[name][extname]', - entryFileNames: 'app.js', - ...output - }, + output: mergedOutput, preserveEntrySignatures: false, plugins: [ ...prePlugins, del( mergeConfig('del', { - targets: [`${jsOutputDirectory}/*`] + targets: [`${mergedOutput.dir}/*`] }) ), copy({ - targets: [{ src: ['public/**', '!public/index.html'], dest: `${jsOutputDirectory}` }] + targets: [{ src: ['public/**', '!public/index.html'], dest: `${mergedOutput.dir}` }] }), // Resolving plugins replace(