grikomsn / vite-plugin-ngmi-polyfill Goto Github PK
View Code? Open in Web Editor NEWVite plugin for polyfilling Node.js built-in globals and modules ⚡️
Home Page: https://www.npmjs.com/package/vite-plugin-ngmi-polyfill
License: MIT License
Vite plugin for polyfilling Node.js built-in globals and modules ⚡️
Home Page: https://www.npmjs.com/package/vite-plugin-ngmi-polyfill
License: MIT License
i've tried install esbuild polyfill get exactly same error with vite-plugin-ngmi-polyfill
VITE v4.0.4 ready in 597 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h to show help
✘ [ERROR] The injected path "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_buffer.js" cannot be marked as external
✘ [ERROR] The injected path "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_virtual-process-polyfill_.js" cannot be marked as external
Build failed with 2 errors:
error: The injected path "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_buffer.js" cannot be marked as external
error: The injected path "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_virtual-process-polyfill_.js" cannot be marked as external
✘ [ERROR] Could not resolve "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_virtual-process-polyfill_.js"
1:14:11 PM [vite] error while updating dependencies:
Error: Build failed with 1 error:
error: Could not resolve "/Users/monsterstep/dev/chat-client/node_modules/@esbuild-plugins/node-globals-polyfill/_virtual-process-polyfill_.js"
at failureErrorWithLog (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:1596:15)
at /Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:1052:28
at runOnEndCallbacks (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:1468:61)
at buildResponseToResult (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:1050:7)
at /Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:1162:14
at responseCallbacks.<computed> (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:697:9)
at handleIncomingPacket (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:752:9)
at Socket.readFromStdout (/Users/monsterstep/dev/chat-client/node_modules/esbuild/lib/main.js:673:7)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
Is this plugin only for vite+react?
https://vitejs.dev/guide/api-plugin.html#conventions
I've tried using this plugin with vite to pollyfill the node api's and unfortunately it didn't work as expected. I included a minimal reproducible example here : https://github.com/Twiggeh/ngmi-report
Hello. I just saw your package, and have a question / suggestion.
From https://github.com/FredKSchott/rollup-plugin-polyfill-node
This repo is an updated, maintained fork of https://github.com/ionic-team/rollup-plugin-node-polyfills to support better Node.js polyfills in Snowpack and all other Rollup projects. See this thread for discussion on moving this plugin into the official Rollup org: rollup/plugins#51 (comment)
I really don't know about all these packages for polyfilling node.js, but I guess in your case you want to use rollup-plugin-polyfill-node
.
SvelteKit now ships with vite 4.0.0 which breaks compatibility with this plugin ("vite": "^3").
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.