@sveltejs/vite-plugin-svelte
Advanced tools
Comparing version 4.0.0-next.4 to 4.0.0-next.5
{ | ||
"name": "@sveltejs/vite-plugin-svelte", | ||
"version": "4.0.0-next.4", | ||
"version": "4.0.0-next.5", | ||
"license": "MIT", | ||
@@ -40,3 +40,3 @@ "author": "dominikg", | ||
"@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0", | ||
"debug": "^4.3.5", | ||
"debug": "^4.3.6", | ||
"deepmerge": "^4.3.1", | ||
@@ -54,5 +54,5 @@ "kleur": "^4.1.5", | ||
"esbuild": "^0.23.0", | ||
"sass": "^1.77.6", | ||
"svelte": "^5.0.0-next.178", | ||
"vite": "^5.3.3" | ||
"sass": "^1.77.8", | ||
"svelte": "^5.0.0-next.200", | ||
"vite": "^5.3.5" | ||
}, | ||
@@ -59,0 +59,0 @@ "scripts": { |
@@ -5,2 +5,4 @@ import { readFileSync } from 'node:fs'; | ||
import { toESBuildError } from './error.js'; | ||
import { safeBase64Hash } from './hash.js'; | ||
import { normalize } from './id.js'; | ||
@@ -53,3 +55,3 @@ /** | ||
* @param {import('../types/options.d.ts').ResolvedOptions} options | ||
* @param {{ filename: string; code: string }} input | ||
* @param {{ filename: string, code: string }} input | ||
* @param {import('../types/vite-plugin-svelte-stats.d.ts').StatCollection} [statsCollection] | ||
@@ -73,2 +75,10 @@ * @returns {Promise<string>} | ||
if (compileOptions.hmr) { | ||
if (options.emitCss) { | ||
const hash = `s-${safeBase64Hash(normalize(filename, options.root))}`; | ||
compileOptions.cssHash = () => hash; | ||
} | ||
compileOptions.hmr = false; | ||
} | ||
let preprocessed; | ||
@@ -75,0 +85,0 @@ |
@@ -136,3 +136,3 @@ import { createFilter, normalizePath } from 'vite'; | ||
*/ | ||
function normalize(filename, normalizedRoot) { | ||
export function normalize(filename, normalizedRoot) { | ||
return stripRoot(normalizePath(filename), normalizedRoot); | ||
@@ -139,0 +139,0 @@ } |
@@ -64,3 +64,3 @@ import { createRequire } from 'node:module'; | ||
const _require = import.meta.url | ||
? esmRequire ?? (esmRequire = createRequire(import.meta.url)) | ||
? (esmRequire ?? (esmRequire = createRequire(import.meta.url))) | ||
: // eslint-disable-next-line no-undef | ||
@@ -67,0 +67,0 @@ require; |
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
123800
3720
Updateddebug@^4.3.6