Skip to content

Commit

Permalink
chore: add the warningFilter to the Rollup config too
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Oct 15, 2024
1 parent 896f055 commit 777e11f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rollup.config.vanilla-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,21 @@ export default {
svelte({
compilerOptions: {
// enable run-time checks when not in production
dev: !production
dev: !production,

warningFilter: (warning) => {
if (warning.code === 'reactive_declaration_non_reactive_property') {
// Disable the warning:
// Properties of objects and arrays are not reactive unless in runes mode.
// Changes to this property will not cause the reactive statement to update (svelte)
// These warnings are wrongfully thrown when using TypeScript enums like Mode.tree
// TODO: find a solution and remove this warningFilter again (possibly this is a bug in Svelte 5)

return false
}

return true
}
},

// we want to embed the CSS in the generated JS bundle
Expand Down

0 comments on commit 777e11f

Please sign in to comment.