-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
The plugin breaks nuxi build #41
Comments
Hey there, @learntheropes. 👋 It looks like this is due to the global import { nodePolyfills } from 'vite-plugin-node-polyfills'
export default defineNuxtConfig({
vite: {
plugins: [
nodePolyfills({
include: ['buffer', 'util', 'stream', 'crypto'],
globals: {
process: false,
},
}),
],
},
}) For what it's worth, this is likely something that should be handled automatically when the |
Thank you, @davidmyersdev ! |
Thank you as well. Without this issue, what was going on would never have occurred to me. I would probably add a small note about this to README.md, so others know. |
|
@lokinz can you share an example with your use case? |
The new version
As pointed out by @lokinz, not polyfilling the process global in build mode did not seem right to me since that is exactly what I need the plugin to do and I was hoping that the new version fixed it. My use case:
This library needs pollyfils as explained here. Version Latest version now breaks both dev and build modes throwing: dev: Here is a reproduction Any help will be appreciated and thanks for the plugin!! 😄 |
I really appreciate the reproduction, @paro-paro! It looks like a dependency is trying to import |
Thanks a lot for your quick response @davidmyersdev ! 🙏 Opening a new issue for tracking... |
Environment
Reproduction
https://github.com/learntheropes/github-anc6tm
https://stackblitz.com/edit/github-anc6tm
But you need to build it.
Describe the bug
In a Nuxt 3 application,
vite.config.js
is replaced innuxt.config.js
as follows.However, the plguin breaks
nuxi build
as follows :Accordingly to Nuxt devs, is a plugin issue: nuxt/nuxt#23091 (comment)
The text was updated successfully, but these errors were encountered: