-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
exports is not defined #7128
Comments
i think it is the problem of lodash.js |
Oh gosh, I don't know where I introduced this, it looks like the default property of vite |
No, mine didn't introduce lodash.js manually, and the result of the query using yarn looks like this $ yarn why lodash
yarn why v1.22.17
warning ../package.json: No license field
[1/4] 🤔 Why do we have the module "lodash"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
- "async" depends on it
- Hoisted from "async#lodash"
- Hoisted from "naive-ui#lodash"
- Hoisted from "eslint-plugin-vue#vue-eslint-parser#lodash"
- Hoisted from "@intlify#vue-i18n-loader#@intlify#bundle-utils#yaml-eslint-parser#lodash"
info Disk size without dependencies: "4.88MB"
info Disk size with unique dependencies: "4.88MB"
info Disk size with transitive dependencies: "4.88MB"
info Number of shared dependencies: 0
✨ Done in 0.81s. |
try to delete "node_modules" and "yarn or npm i "? |
have tried, including removing yarn.lock |
Can you explain why |
@walletconnect/web3-provider is CommonJS, so you need to open it, see https://github.com/chnejohnson/vue-dapp/issues/20 |
i also have similar problem with formik , error was "exports not definded" , it fixed after i change to following config in vite.config.js |
thank you, i will try it |
provided reproduction doesn't give any error message development or in production |
Closing per @Niputi comment. @EndureBlaze feel free to create a new issue against the latest version of Vite if you still see the issue. Thansk! |
Describe the bug
enable
![image](https://user-images.githubusercontent.com/25337480/156119216-0e508639-da9b-4c3d-945f-d73f0c688dab.png)
transformMixedEsModules
and runyarn build && yarn preview
vite.config.ts
package.json
main.ts
Reproduction
https://github.com/MetaplasiaTeam/castable-nft-web
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: