We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug vite projects fail to consume js-big-decimal.
To Reproduce Repro repo is here: https://github.com/NiloCK/vite-bigdecimal-import-reproduction
See the readme.
Expected behavior In the repo, yarn dev should serve the sample app page, with the counter integer replaced by a bigDecimal.
yarn dev
Additional context The vite site seems to be mistakenly importing content from the dist/node folder, instead of dist/web
dist/node
dist/web
There is some issue with:
The text was updated successfully, but these errors were encountered:
Response from the related issue filed vitejs/vite: vitejs/vite#13031 (comment)
Quoting in full:
The bundled file is from dist/node/..., where it should be from dist/web/.... js-big-decimal doesn't declare exports/browser field and therefore Vite resolves the package with main field that points to dist/node/.... You can specify the actual file instead. import "js-big-decimal/dist/web/js-big-decimal.js" Although, It doesn't work because js-big-decimal doesn't support ESM. Closing as it's working as intended.
The bundled file is from dist/node/..., where it should be from dist/web/....
dist/node/...
dist/web/...
js-big-decimal doesn't declare exports/browser field and therefore Vite resolves the package with main field that points to dist/node/....
js-big-decimal
exports
browser
main
You can specify the actual file instead.
import "js-big-decimal/dist/web/js-big-decimal.js"
Although, It doesn't work because js-big-decimal doesn't support ESM.
Closing as it's working as intended.
Sorry, something went wrong.
@NiloCK Please validate and close this.
royNiladri
Successfully merging a pull request may close this issue.
Describe the bug
vite projects fail to consume js-big-decimal.
To Reproduce
Repro repo is here: https://github.com/NiloCK/vite-bigdecimal-import-reproduction
See the readme.
Expected behavior
In the repo,
yarn dev
should serve the sample app page, with the counter integer replaced by a bigDecimal.Additional context
The vite site seems to be mistakenly importing content from the
dist/node
folder, instead ofdist/web
There is some issue with:
The text was updated successfully, but these errors were encountered: