warn if using svelte:options tag without compile_options.customElement

pull/3782/head
Tan Li Hau 5 years ago
parent 1f6e0eb316
commit cfd3b63b9b

@ -1307,6 +1307,13 @@ function process_component_options(component: Component, nodes) {
});
}
if (tag && !component.compile_options.customElement) {
component.warn(attribute, {
code: 'missing-custom-element-compile-options',
message: `tag name is used when compiling the compenent as a custom element. Did you forgot to add "customElement" for compile options?`
});
}
component_options.tag = tag;
break;
}

@ -0,0 +1,17 @@
[
{
"code": "missing-custom-element-compile-options",
"end": {
"character": 36,
"column": 36,
"line": 1
},
"message": "tag name is used when compiling the compenent as a custom element. Did you forgot to add \"customElement\" for compile options?",
"pos": 16,
"start": {
"character": 16,
"column": 16,
"line": 1
}
}
]
Loading…
Cancel
Save