Closed elmariachi111 closed 2 years ago
When "convincing" babel by hacking the browserslist the next issue is
/..../node_modules/.pnpm/image-q@2.1.2/node_modules/image-q/dist/esm/basicAPI.js
Module not found: Can't resolve 'core-js/fn/set-immediate' in '..../node_modules/.pnpm/image-q@2.1.2/node_modules/image-q/dist/esm'
think it might help to set the tsconfig's target
to es6
@elmariachi111
esm
build in image-q is actually not compatible with real ES Modules, only tools like webpack can consume it.
@elmariachi111 could you please check image-q@4.0.0
if it works for you?
@ibezkrovnyi just updated all our dependencies and 4.0.0 runs nicely inside a browser and a node context at the same time now. Nice work, thanks a lot, highly appreciated! That's my adapted repo for React: https://github.com/elmariachi111/esm-err-imageq/commit/9d17b93d04fe80de780452b63cbedfc5857dfa57
cannot import image-q from an app that's built on Create React App 4.
created a demo: https://github.com/elmariachi111/esm-err-imageq
npm run start
yields:Have parsed through your ts config. Assume this isn't working because the emitted js files are built for esnext and that's not supported by the webpack config of CRA (4). Btw it does build on the brand new CRA 5 but this one dropped support for node types and the whole web3 industry depends on them so upgrading atm isn't an option. Any ideas?