@sveltejs/vite-plugin-svelte
Advanced tools
Comparing version 1.0.0-next.36 to 1.0.0-next.37
@@ -1411,5 +1411,5 @@ var __defProp = Object.defineProperty; | ||
import path5 from "path"; | ||
import { createRequire as createRequire4 } from "module"; | ||
import { builtinModules, createRequire as createRequire4 } from "module"; | ||
function resolveViaPackageJsonSvelte(importee, importer, cache) { | ||
if (importer && isBareImport(importee) && !is_common_without_svelte_field(importee)) { | ||
if (importer && isBareImport(importee) && !isNodeInternal(importee) && !is_common_without_svelte_field(importee)) { | ||
const cached = cache.getResolvedSvelteField(importee, importer); | ||
@@ -1433,2 +1433,5 @@ if (cached) { | ||
} | ||
function isNodeInternal(importee) { | ||
return importee.startsWith("node:") || builtinModules.includes(importee); | ||
} | ||
function isBareImport(importee) { | ||
@@ -1435,0 +1438,0 @@ if (!importee || importee[0] === "." || importee[0] === "\0" || importee.includes(":") || path5.isAbsolute(importee)) { |
{ | ||
"name": "@sveltejs/vite-plugin-svelte", | ||
"version": "1.0.0-next.36", | ||
"version": "1.0.0-next.37", | ||
"license": "MIT", | ||
@@ -63,6 +63,6 @@ "author": "dominikg", | ||
"diff-match-patch": "^1.0.5", | ||
"esbuild": "^0.14.13", | ||
"rollup": "^2.66.0", | ||
"svelte": "^3.46.2", | ||
"tsup": "^5.11.11", | ||
"esbuild": "^0.14.14", | ||
"rollup": "^2.66.1", | ||
"svelte": "^3.46.3", | ||
"tsup": "^5.11.13", | ||
"vite": "^2.7.13" | ||
@@ -69,0 +69,0 @@ }, |
import path from 'path'; | ||
import { createRequire } from 'module'; | ||
import { builtinModules, createRequire } from 'module'; | ||
import { is_common_without_svelte_field, resolveDependencyData } from './dependencies'; | ||
@@ -11,3 +11,8 @@ import { VitePluginSvelteCache } from './vite-plugin-svelte-cache'; | ||
): string | void { | ||
if (importer && isBareImport(importee) && !is_common_without_svelte_field(importee)) { | ||
if ( | ||
importer && | ||
isBareImport(importee) && | ||
!isNodeInternal(importee) && | ||
!is_common_without_svelte_field(importee) | ||
) { | ||
const cached = cache.getResolvedSvelteField(importee, importer); | ||
@@ -32,2 +37,6 @@ if (cached) { | ||
function isNodeInternal(importee: string) { | ||
return importee.startsWith('node:') || builtinModules.includes(importee); | ||
} | ||
function isBareImport(importee: string): boolean { | ||
@@ -34,0 +43,0 @@ if ( |
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
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
432532
5753