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 e0a47c2 commit 11b29a4Copy full SHA for 11b29a4
packages/app/src/sandbox/eval/transpilers/babel/index.ts
@@ -51,9 +51,15 @@ class BabelTranspiler extends WorkerTranspiler {
51
const { path } = loaderContext;
52
53
if (isESModule(code) && path.indexOf('/node_modules') > -1) {
54
- measure(`es-${path}`);
55
- code = convertEsModule(path, code);
56
- endMeasure(`es-${path}`);
+ try {
+ measure(`es-${path}`);
+ code = convertEsModule(path, code);
57
+ endMeasure(`es-${path}`);
58
+ } catch (e) {
59
+ console.warn(
60
+ `Error when converting '${path}' esmodule to commonjs: ${e.message}`
61
+ );
62
+ }
63
}
64
65
// When we find a node_module that already is commonjs we will just get the
0 commit comments