Ignore some client lib warnings

This commit is contained in:
Andrew Kingston 2021-04-01 19:25:56 +01:00
parent 80454387be
commit 7fc31a1001
1 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,12 @@ import builtins from "rollup-plugin-node-builtins"
import globals from "rollup-plugin-node-globals" import globals from "rollup-plugin-node-globals"
const production = !process.env.ROLLUP_WATCH const production = !process.env.ROLLUP_WATCH
const ignoredWarnings = [
"unused-export-let",
"css-unused-selector",
"module-script-reactive-declaration",
"a11y-no-onchange",
]
export default { export default {
input: "src/index.js", input: "src/index.js",
@ -22,6 +28,12 @@ export default {
plugins: [ plugins: [
svelte({ svelte({
emitCss: true, emitCss: true,
onwarn: (warning, handler) => {
// Ignore some warnings
if (!ignoredWarnings.includes(warning.code)) {
handler(warning)
}
},
}), }),
postcss(), postcss(),
commonjs(), commonjs(),