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
But this gives me d3-format.min.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
I've tried a few different "moduleTypes" but none of them seem to apply to the require()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to get a project working with a mix of CommonJS (that I can't migrate to ESM) and ESM dependencies, in this case
d3-format
.I've gotten the require to point to the
dist
folder usingI do have
"require": ["tsconfig-paths/register"],
But this gives me
d3-format.min.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
I've tried a few different "moduleTypes" but none of them seem to apply to the
require()
Any help would be appreciated. We're also using
"swc": true
if that matters.Related: #2077 (comment)
Beta Was this translation helpful? Give feedback.
All reactions