You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I can't build a component that imports an untranspiled ES module from a dependency. Three notoriously ships its examples (including OrbitControls, etc.) as untranspiled ESM. It looks like the undocumented compileLibs option is respected in src/pipeline/bundle-js but not in src/node-config.
Describe the solution you'd like
Ideally, idyll would allow extending the default babelConfig (perhaps similarly to how Next.js extends webpack config). This would allow userland solutions to my issue (transpiling an ES module from a dependency) but also other customization that might otherwise require adding and supporting additional flags.
Describe alternatives you've considered
Even if the compileLibs option was extended to turn on node_modules transpilation everywhere, the solution would be inefficient as transpiling all dependencies is expensive. In my case, it is only one dependency (three) which requires transpilation.
Additional context
I also tried to submit a simple PR to make src/node-config respect compileLibs by having babel-registercompile node_modules, but couldn't get the approach to work as idyll has other dependencies in node_modules that break when run through babel-register.
The text was updated successfully, but these errors were encountered:
It looks like the problem is made a bit more difficult by the fact that there are two layers of babel transformation happening? Does babel-register not respect other babelConfig?
Is your feature request related to a problem? Please describe.
I can't build a component that imports an untranspiled ES module from a dependency. Three notoriously ships its examples (including OrbitControls, etc.) as untranspiled ESM. It looks like the undocumented
compileLibs
option is respected insrc/pipeline/bundle-js
but not insrc/node-config
.Describe the solution you'd like
Ideally, idyll would allow extending the default babelConfig (perhaps similarly to how Next.js extends webpack config). This would allow userland solutions to my issue (transpiling an ES module from a dependency) but also other customization that might otherwise require adding and supporting additional flags.
Describe alternatives you've considered
Even if the
compileLibs
option was extended to turn onnode_modules
transpilation everywhere, the solution would be inefficient as transpiling all dependencies is expensive. In my case, it is only one dependency (three
) which requires transpilation.Additional context
I also tried to submit a simple PR to make
src/node-config
respectcompileLibs
by havingbabel-register
compilenode_modules
, but couldn't get the approach to work asidyll
has other dependencies innode_modules
that break when run throughbabel-register
.The text was updated successfully, but these errors were encountered: