rollup config - ignore some svelte warnings

This commit is contained in:
Jan Prochazka
2022-11-03 16:40:54 +01:00
parent f4a4eb7f9e
commit 435d06ffb9

View File

@@ -45,7 +45,7 @@ export default [
resolve({
browser: true,
}),
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser(),
@@ -88,6 +88,20 @@ export default [
// enable run-time checks when not in production
dev: !production,
},
onwarn: (warning, handler) => {
const ignoreWarnings = [
'a11y-click-events-have-key-events',
'a11y-missing-attribute',
'a11y-invalid-attribute',
'a11y-no-noninteractive-tabindex',
'a11y-label-has-associated-control',
'vite-plugin-svelte-css-no-scopable-elements',
'unused-export-let',
];
if (ignoreWarnings.includes(warning.code)) return;
// console.log('***************************', warning.code);
handler(warning);
},
}),
// we'll extract any component CSS out into
// a separate file - better for performance