@@ -258,14 +258,14 @@ const rewriteImportedGlobals = state => bin => {
258258 * @param {Object } state state
259259 * @param {Object } state.ast Module's ast
260260 * @param {Module } state.module Module
261- * @param {Set<string> } state.invalidExports Module
261+ * @param {Set<string> } state.externalExports Module
262262 * @returns {ArrayBufferTransform } transform
263263 */
264- const rewriteExportNames = ( { ast, module, invalidExports } ) => bin => {
264+ const rewriteExportNames = ( { ast, module, externalExports } ) => bin => {
265265 return editWithAST ( ast , bin , {
266266 ModuleExport ( path ) {
267- const isInvalid = invalidExports . has ( path . node . name ) ;
268- if ( isInvalid ) {
267+ const isExternal = externalExports . has ( path . node . name ) ;
268+ if ( isExternal ) {
269269 path . remove ( ) ;
270270 return ;
271271 }
@@ -413,7 +413,7 @@ class WebAssemblyGenerator extends Generator {
413413 const nextTypeIndex = getNextTypeIndex ( ast ) ;
414414
415415 const usedDependencyMap = getUsedDependencyMap ( module ) ;
416- const invalidExports = new Set (
416+ const externalExports = new Set (
417417 module . dependencies
418418 . filter ( d => d instanceof WebAssemblyExportImportedDependency )
419419 . map ( d => d . exportName )
@@ -426,7 +426,7 @@ class WebAssemblyGenerator extends Generator {
426426 rewriteExportNames ( {
427427 ast,
428428 module,
429- invalidExports
429+ externalExports
430430 } ) ,
431431
432432 removeStartFunc ( { ast } ) ,
0 commit comments