Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-node-stdlib-browser

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-node-stdlib-browser

Configure `node-stdlib-browser` for Vite projects

  • 0.2.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vite-plugin-node-stdlib-browser

Disclaimer: I've only tested this plugin in simple projects. If you encounter any issues, please open an issue with a minimal reproduction in the project repository.

Add browser polyfills of Node.js built-in libraries for Vite projects. Based on node-stdlib-browser.

Usage

npm add node-stdlib-browser
npm add -D vite-plugin-node-stdlib-browser
// vite.config.js
import { defineConfig } from 'vite'
import nodePolyfills from 'vite-plugin-node-stdlib-browser'

export default defineConfig({
  plugins: [nodePolyfills()]
})

Notes

  • node: protocol imports are not supported yet.
  • The plugin only polyfills the dependencies, not the user code. This is intentional because you shouldn't rely on Node.js built-in libraries in the browser.

Alternatives

FAQs

Package last updated on 06 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc