vite-plugin-electron-renderer
Advanced tools
Comparing version 0.13.2 to 0.13.3
@@ -0,1 +1,5 @@ | ||
## 0.13.3 (2023-03-21) | ||
- de584cc fix: filter `virtual-module:` | ||
## 0.13.2 (2023-03-21) | ||
@@ -2,0 +6,0 @@ |
13
index.js
@@ -154,3 +154,3 @@ "use strict"; | ||
const cjs_require = node_module.createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : document.currentScript && document.currentScript.src || new URL("index.js", document.baseURI).href); | ||
const electronNpmCjsNamespace = "electron:npm-cjs"; | ||
const electronNpmPkgCjsNamespace = "electron:npm-pkg-cjs"; | ||
const bareImport = /^[\w@].*/; | ||
@@ -224,2 +224,5 @@ const CACHE_DIR = ".vite-electron-renderer"; | ||
} | ||
if (id.startsWith("virtual-module:")) { | ||
return; | ||
} | ||
let moduleType; | ||
@@ -245,2 +248,3 @@ const packageJson = path.join(node_modules_path, id, "package.json"); | ||
} | ||
moduleType ?? (moduleType = "commonjs"); | ||
} | ||
@@ -254,7 +258,6 @@ const userType = await (resolve == null ? void 0 : resolve(args)); | ||
} | ||
moduleType ?? (moduleType = "commonjs"); | ||
if (moduleType === "commonjs") { | ||
return { | ||
path: id, | ||
namespace: electronNpmCjsNamespace | ||
namespace: electronNpmPkgCjsNamespace | ||
}; | ||
@@ -265,3 +268,3 @@ } | ||
filter: /.*/, | ||
namespace: electronNpmCjsNamespace | ||
namespace: electronNpmPkgCjsNamespace | ||
}, async ({ path: id }) => { | ||
@@ -279,3 +282,3 @@ const { exports: exports2 } = libEsm({ exports: Object.getOwnPropertyNames(cjs_require(id)) }); | ||
${exports2} | ||
`.trim() | ||
`.trim() | ||
}; | ||
@@ -282,0 +285,0 @@ }); |
{ | ||
"name": "vite-plugin-electron-renderer", | ||
"version": "0.13.2", | ||
"version": "0.13.3", | ||
"description": "Support use Node.js API in Electron-Renderer", | ||
@@ -5,0 +5,0 @@ "main": "index.mjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90852
1840