diff --git a/.changeset/curvy-melons-knock.md b/.changeset/curvy-melons-knock.md new file mode 100644 index 000000000000..dcf158b4ee85 --- /dev/null +++ b/.changeset/curvy-melons-knock.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: allow `warningFilter` option for `compileModule` diff --git a/packages/svelte/src/compiler/validate-options.js b/packages/svelte/src/compiler/validate-options.js index c84fdac8a791..9465cba77a06 100644 --- a/packages/svelte/src/compiler/validate-options.js +++ b/packages/svelte/src/compiler/validate-options.js @@ -31,7 +31,9 @@ const common = { } return input; - }) + }), + + warningFilter: fun(() => true) }; export const validate_module_options = @@ -106,8 +108,6 @@ export const validate_component_options = hmr: boolean(false), - warningFilter: fun(() => true), - sourcemap: validator(undefined, (input) => { // Source maps can take on a variety of values, including string, JSON, map objects from magic-string and source-map, // so there's no good way to check type validity here