Skip to content

Suppress warning during rendering chunks #9196

@mrtronje

Description

@mrtronje

Describe the bug

Since the update from vite v2 to v3 I get the following warning when I run yarn build:

image

Is there a way to suppress such warnings? I can't correct "overflow-X" because this comes from an external node module.

my configuration:

import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';

// https://vitejs.dev/config/
export default defineConfig({
    build: {
        chunkSizeWarningLimit: 4000,
        outDir: 'public',
        sourcemap: true,
    },
    plugins: [
        svelte({
            onwarn(warning, defaultHandler) {
                if (warning.code === 'a11y-invalid-attribute') return;
                defaultHandler(warning);
            },
        }),
    ],
    publicDir: 'public_vite',
    server: {
        proxy: {
            '/api': {
                target: 'https://app.lndo.site',
                changeOrigin: true,
                secure: false,
            },
        },
    },
});

Reproduction

https://stackblitz.com/edit/vitejs-vite-anx6q5?file=main.js to reproduce use npm install && npm run build

System Info

I don't have npx. However, since the warning also appears in the reproduction link, this information should not be necessary

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

Labels

feat: cssp2-nice-to-haveNot breaking anything but nice to have (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions