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
e.g.:
I bundle a lib package with latest esbuild(format: esm, target: chrome100 & "type":"module" in package.json), which export a react component, by default the output would be something like:
import{jsx}from'react/jsx-runtime';
....
then if some project used my lib but bundle with webpack, the error would happen:
in my opinion, if my package set type to module explicitly, esbuild should add .js to the import path:
import{jsx}from'react/jsx-runtime.js';
....
The text was updated successfully, but these errors were encountered:
The /jsx-runtime and /jsx-dev-runtime subpaths are hard-coded by design and cannot be changed.
This is deliberate behavior.
in my opinion, if my package set type to module explicitly, esbuild should add .js to the import path:
import{jsx}from'react/jsx-runtime.js';
They tried doing what you suggested, and then they reverted it because it was a bad idea: babel/babel#12210. Closing this issue as esbuild is working as intended. Your bug report is a problem with React, not with esbuild, and this problem was fixed in React 18: facebook/react#20235 (comment).
The /jsx-runtime and /jsx-dev-runtime subpaths are hard-coded by design and cannot be changed.
This is deliberate behavior.
in my opinion, if my package set type to module explicitly, esbuild should add .js to the import path:
import{jsx}from'react/jsx-runtime.js';
They tried doing what you suggested, and then they reverted it because it was a bad idea: babel/babel#12210. Closing this issue as esbuild is working as intended. Your bug report is a problem with React, not with esbuild, and this problem was fixed in React 18: facebook/react#20235 (comment).
e.g.:
I bundle a lib package with latest esbuild(format: esm, target: chrome100 &
"type":"module"
in package.json), which export a react component, by default the output would be something like:then if some project used my lib but bundle with webpack, the error would happen:
in my opinion, if my package set type to
module
explicitly, esbuild should add.js
to the import path:The text was updated successfully, but these errors were encountered: