Skip to content

Commit

Permalink
fix: fix module isolation runtime utils
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Dec 8, 2024
1 parent cf99edd commit 2be770c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/vite/misc/rolldown-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ var __toBinary = /* @__PURE__ */ (() => {
}
})()

// TODO: for now need to expose these utilities used by IsolatingModuleFinalizermodule
self.__toCommonJS = __toCommonJS
self.__toESM = __toESM
self.__export = __export
self.__reExport = __reExport

var rolldown_runtime = (self.rolldown_runtime = {
patching: false,
patchedModuleFactoryMap: {},
Expand Down
4 changes: 0 additions & 4 deletions packages/vite/src/node/server/environments/rolldown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,6 @@ class RolldownModuleRunner {
}
code = `\
'use strict';(${Object.keys(context).join(',')})=>{{${code}
// TODO: need to re-expose runtime utilities for now
self.__toCommonJS = __toCommonJS;
self.__export = __export;
self.__toESM = __toESM;
}}
//# sourceURL=${sourceURL}
//# sourceMappingSource=rolldown-module-runner
Expand Down

0 comments on commit 2be770c

Please sign in to comment.