Skip to content

Using a different theme appears to result in lot of files #10103

Answered by pskelin
davidlam-winc asked this question in Q&A
Discussion options

You must be logged in to vote

the build tools are usually capable of marking certain modules as external and will not include them in the build result. Here is an example I made with vitejs, including only german and english for the message bundles:

// vite.config.ts
import { defineConfig } from 'vite'

export default defineConfig({
    build: {
        rollupOptions: {
            external: (id) => {
                // messagebundle files in @ui5/webcomponents/dist folder
                if (id.includes('@ui5/webcomponents/dist') && id.includes('messagebundle')) {
                    const keep = id.endsWith("messagebundle_de.json") || id.endsWith("messagebundle_en.json")
                    if (keep) {

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by davidlam-winc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants