We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37a99eb commit 872c368Copy full SHA for 872c368
src/sandbox/eval/manager.js
@@ -94,11 +94,18 @@ export default class Manager {
94
};
95
96
Object.keys(this.manifest.contents).forEach(path => {
97
- this.addModule({
+ const module: Module = {
98
path,
99
code: this.manifest.contents[path].content,
100
- requires: this.manifest.contents[path].requires,
101
- });
+ };
+
102
+ // Check if module syntax, only transpile when that's NOT the case
103
+ // TODO move this check to the packager
104
+ if (!/^(import|export)\s/gm.test(module.code)) {
105
+ module.requires = this.manifest.contents[path].requires;
106
+ }
107
108
+ this.addModule(module);
109
});
110
}
111
0 commit comments