Skip to content

Commit

Permalink
[fix] don't emit css option deprecation warning for now (#8012)
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Nov 10, 2022
1 parent ee480bd commit f4779ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Svelte changelog

## Unreleased

* Do not emit deprecation warnings for `css` compiler options for now ([#8009](https://github.com/sveltejs/svelte/issues/8009))

## 3.53.0

* Check whether `parentNode` exists before removing child ([#6037](https://github.com/sveltejs/svelte/issues/6037))
Expand Down
16 changes: 9 additions & 7 deletions src/compiler/compile/index.ts
Expand Up @@ -89,13 +89,15 @@ function validate_options(options: CompileOptions, warnings: Warning[]) {

if (css === true || css === false) {
options.css = css === true ? 'injected' : 'external';
const message = `options.css as a boolean is deprecated. Use '${options.css}' instead of ${css}.`;
warnings.push({
code: 'options-css-boolean-deprecated',
message,
filename,
toString: () => message
});
// possibly show this warning once we decided how Svelte 4 looks like
// const message = `options.css as a boolean is deprecated. Use '${options.css}' instead of ${css}.`;
// warnings.push({
// code: 'options-css-boolean-deprecated',
// message,
// filename,
// toString: () => message
// });
// }
}

if (namespace && valid_namespaces.indexOf(namespace) === -1) {
Expand Down

0 comments on commit f4779ee

Please sign in to comment.