@@ -258,14 +258,14 @@ const rewriteImportedGlobals = state => bin => {
258
258
* @param {Object } state state
259
259
* @param {Object } state.ast Module's ast
260
260
* @param {Module } state.module Module
261
- * @param {Set<string> } state.invalidExports Module
261
+ * @param {Set<string> } state.externalExports Module
262
262
* @returns {ArrayBufferTransform } transform
263
263
*/
264
- const rewriteExportNames = ( { ast, module, invalidExports } ) => bin => {
264
+ const rewriteExportNames = ( { ast, module, externalExports } ) => bin => {
265
265
return editWithAST ( ast , bin , {
266
266
ModuleExport ( path ) {
267
- const isInvalid = invalidExports . has ( path . node . name ) ;
268
- if ( isInvalid ) {
267
+ const isExternal = externalExports . has ( path . node . name ) ;
268
+ if ( isExternal ) {
269
269
path . remove ( ) ;
270
270
return ;
271
271
}
@@ -413,7 +413,7 @@ class WebAssemblyGenerator extends Generator {
413
413
const nextTypeIndex = getNextTypeIndex ( ast ) ;
414
414
415
415
const usedDependencyMap = getUsedDependencyMap ( module ) ;
416
- const invalidExports = new Set (
416
+ const externalExports = new Set (
417
417
module . dependencies
418
418
. filter ( d => d instanceof WebAssemblyExportImportedDependency )
419
419
. map ( d => d . exportName )
@@ -426,7 +426,7 @@ class WebAssemblyGenerator extends Generator {
426
426
rewriteExportNames ( {
427
427
ast,
428
428
module,
429
- invalidExports
429
+ externalExports
430
430
} ) ,
431
431
432
432
removeStartFunc ( { ast } ) ,
0 commit comments