omit deprecation warning completely for now

pull/8012/head
Simon H 4 years ago committed by GitHub
parent 189d9c825c
commit 11a32efd3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,8 +46,6 @@ const valid_css_values = [
const regex_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
const regex_starts_with_lowercase_character = /^[a-z]/;
let has_shown_deprecation = false;
function validate_options(options: CompileOptions, warnings: Warning[]) {
const { name, filename, loopGuardTimeout, dev, namespace, css } = options;
@ -91,16 +89,15 @@ function validate_options(options: CompileOptions, warnings: Warning[]) {
if (css === true || css === false) {
options.css = css === true ? 'injected' : 'external';
if (!has_shown_deprecation) {
has_shown_deprecation=true;
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) {

Loading…
Cancel
Save