Skip to content

Commit 933ab44

Browse files
committed
Add attributes to export/import declarations
This adds empty arrays for import attributes, a requirement likely not actually needed in the wild, but recently added ass required in `@types/estree`.
1 parent 67fb1d0 commit 933ab44

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

packages/mdx/lib/plugin/recma-document.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export function recmaDocument(options) {
112112
local: {type: 'Identifier', name: pragma.split('.')[0]}
113113
}
114114
],
115+
attributes: [],
115116
source: {type: 'Literal', value: pragmaImportSource}
116117
})
117118
}
@@ -215,6 +216,7 @@ export function recmaDocument(options) {
215216
const declaration = {
216217
type: 'ImportDeclaration',
217218
specifiers,
219+
attributes: [],
218220
source: from
219221
}
220222
create(specifier, declaration)

packages/mdx/lib/plugin/recma-jsx-rewrite.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ function createImportProvider(providerImportSource, outputFormat) {
580580
: {
581581
type: 'ImportDeclaration',
582582
specifiers,
583+
attributes: [],
583584
source: {type: 'Literal', value: providerImportSource}
584585
}
585586
}

website/mdx-loader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ function recmaInjectMeta(options) {
252252
]
253253
},
254254
source: undefined,
255+
attributes: [],
255256
specifiers: []
256257
})
257258
}

0 commit comments

Comments
 (0)