-
Notifications
You must be signed in to change notification settings - Fork 71
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
package.json
browser
field has no effect (bundling Axios)
#427
Comments
browser
field have no effect when bundle for browser (bundle Axios)package.json
browser
field has no effect (bundling Axios)
|
I think this may be related to an issue in plugin-node-resolve 14.x: rollup/plugins#1267 |
@FranklinWhale that could impact some things, but that doesn't seem to be related to this specific issue. Downgrading And, in general, rpt2 should be |
Troubleshooting
Does
tsc
have the same output? If so, please explain why this is incorrect behavioryes
Does your Rollup plugin order match this plugin's compatibility? If not, please elaborate
yes
Can you create a minimal example that reproduces this behavior? Preferably, use this environment for your reproduction
https://stackblitz.com/edit/rpt2-repro-xabeaq?file=rollup.config.js
What happens and why it is incorrect
the Axios package has this field
browser
set in package.json that mapthe
@rollup/plugin-node-resolve
plugin correctly resolves this file when bundling for browser. When add typescript with this plugin (or@rollup/plugin-typescript
), theadapters/http.js
file is included in the bundle. How to let this plugin know that the bundle is for the browser?Environment
browser bundle
Versions
:tsconfig.json
:package.json
plugin output with verbosity 3
:The text was updated successfully, but these errors were encountered: