-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug?]: esbuild-plugin-pnp doesn't use module in package.json for libraries #3185
Comments
Can you please take a look at this? I think it will be a problem for a lot of projects |
Hi! 👋 This issue looks stale, and doesn't feature the Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃 If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the |
To workaround this bug I used the plugins: [pnpPlugin({
extensions: ['.tsx', '.ts', '.jsx', '.mjs', '.cjs', '.js', '.css', '.json', 'src/index.js']
})], This is a temporary fix. I believe there will be more packages like that, so the bug is still valid. |
Related issue and an alternative workaround #2987 (comment) |
Native support for PnP was added to |
Describe the bug
Even if in the building options of esbuild it's define
module
in themainFields
the plugin use always (and onlymain
). This will create some problem because when building inesm
oriife
usually library put the umd (or commonjs) version in main and the esm one in modules.To reproduce
One of the library that has this configuration in the package.json is
swr
The following file can help to make a use case test
esbuild.js
src/index.ts
package.json
Environment
OS: macOS
browser: chrome, firefox
Additional context
No response
The text was updated successfully, but these errors were encountered: