no missing-declaration warning for import.meta

pull/5423/head
Tan Li Hau 5 years ago
parent ef40dea221
commit a8e0a32287

@ -64,6 +64,8 @@ export default class Expression {
enter(node: any, parent: any, key: string) {
// don't manipulate shorthand props twice
if (key === 'value' && parent.shorthand) return;
// don't manipulate `import.meta`, `new.target`
if (node.type === 'MetaProperty') return this.skip();
if (map.has(node)) {
scope = map.get(node);

@ -0,0 +1,6 @@
<script>
const url = import.meta.url;
</script>
{ url }
{ import.meta.url }
Loading…
Cancel
Save