Socket
Socket
Sign inDemoInstall

vite-plugin-node-polyfills

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-node-polyfills - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

42

dist/index.js
import { createRequire as n } from "node:module";
import p from "@rollup/plugin-inject";
import u from "node-stdlib-browser";
import { handleCircularDependancyWarning as c } from "node-stdlib-browser/helpers/rollup/plugin";
import c from "node-stdlib-browser";
import { handleCircularDependancyWarning as u } from "node-stdlib-browser/helpers/rollup/plugin";
import f from "node-stdlib-browser/helpers/esbuild/plugin";
const I = (i = {}) => {
const r = n(import.meta.url).resolve("node-stdlib-browser/helpers/esbuild/shim"), t = {
const B = (t = {}) => {
const o = n(import.meta.url).resolve("node-stdlib-browser/helpers/esbuild/shim"), i = {
protocolImports: !0,
...i
...t
};
return {
name: "vite-plugin-node-polyfills",
config: (a, b) => {
const s = Object.entries(u).reduce((o, [e, l]) => (!t.protocolImports && /^node:/.test(e) || (o[e] = l), o), {});
config: (m, g) => {
const l = Object.entries(c).reduce((e, [r, s]) => (!i.protocolImports && /^node:/.test(r) || (e[r] = s), e), {});
return {
build: {
rollupOptions: {
onwarn: (o, e) => {
c(o, e);
onwarn: (e, r) => {
u(e, r);
},

@@ -24,5 +24,5 @@ plugins: [

...p({
global: [r, "global"],
process: [r, "process"],
Buffer: [r, "Buffer"]
global: [o, "global"],
process: [o, "process"],
Buffer: [o, "Buffer"]
})

@@ -41,6 +41,16 @@ }

inject: [
r
o
],
plugins: [
f(s)
f(l),
{
name: "vite-plugin-node-polyfills-shims-resolver",
setup(e) {
const r = o.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(`^${r}$`);
e.onResolve({ filter: s }, () => ({
external: !1,
path: o
}));
}
}
]

@@ -51,3 +61,3 @@ }

alias: {
...s
...l
}

@@ -60,4 +70,4 @@ }

export {
I as nodePolyfills
B as nodePolyfills
};
//# sourceMappingURL=index.js.map
{
"name": "vite-plugin-node-polyfills",
"description": "A Vite plugin to polyfill Node's Core Modules for browser environments.",
"version": "0.6.0",
"version": "0.7.0",
"author": "David Myers <david@voracious.dev>",

@@ -39,10 +39,10 @@ "funding": "https://github.com/sponsors/voracious",

"@types/node": "^18.7.23",
"esbuild": "^0.16.10",
"esbuild": "^0.16.16",
"ohmyfetch": "^0.4.20",
"rollup": "^3.8.1",
"typescript": "4.8.3",
"vite": "^4.0.3",
"vite": "^4.0.4",
"vite-plugin-externalize-deps": "^0.1.5",
"vite-plugin-inspect": "^0.6.0",
"vite-plugin-node-polyfills": "0.6.0"
"vite-plugin-node-polyfills": "0.7.0"
},

@@ -49,0 +49,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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