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
Split off from #38 to have the discussion without specific implementation details.
The js template currently transpiles the code to CJS, so we can't easily import ESM modules (in a sync way) in our services. This can become an issue since there are npm packages out there that only publish ESM code now. Since we already write ESM-like code, (or TS) it might be worthwhile to change the setup to output ESM instead.
node requires that local imports in ESM modules have extensions. This is breaking change since services would have to adjust the import paths. A workaround could be to use the mentioned babel plugin, but I'm not sure if we should.
The text was updated successfully, but these errors were encountered:
So it seems that the main reason why we wanted this change (cjs can't sync import esm) will not be an issue anymore in the future. I do still think it's a better setup though, especially since we already write ESM-ish code anyways.
How does the extension work with respect to transpiling coffeescript and typescript code? Does the extension "stick" to the original extension or does everything need a .js postfix?
Split off from #38 to have the discussion without specific implementation details.
The js template currently transpiles the code to CJS, so we can't easily import ESM modules (in a sync way) in our services. This can become an issue since there are npm packages out there that only publish ESM code now. Since we already write ESM-like code, (or TS) it might be worthwhile to change the setup to output ESM instead.
Some caveats mentioned in #38:
The text was updated successfully, but these errors were encountered: