esbuild-sass-plugin
Advanced tools
Comparing version 1.4.10 to 1.4.11
@@ -174,3 +174,3 @@ "use strict"; | ||
} | ||
const watchFilesCache = "watch" in build ? {} : null; | ||
const lastWatchFiles = build.initialOptions.watch ? {} : null; | ||
async function transform(path, type) { | ||
@@ -184,4 +184,4 @@ var _a; | ||
watchFiles = [...watchFiles]; | ||
if (watchFilesCache) { | ||
watchFilesCache[path] = watchFiles; | ||
if (lastWatchFiles) { | ||
lastWatchFiles[path] = watchFiles; | ||
} | ||
@@ -203,3 +203,3 @@ return type === "css" ? { | ||
errors: [{ text: err.message }], | ||
watchFiles: (_a = watchFilesCache === null || watchFilesCache === void 0 ? void 0 : watchFilesCache[path]) !== null && _a !== void 0 ? _a : [path] | ||
watchFiles: (_a = lastWatchFiles === null || lastWatchFiles === void 0 ? void 0 : lastWatchFiles[path]) !== null && _a !== void 0 ? _a : [path] | ||
}; | ||
@@ -206,0 +206,0 @@ } |
{ | ||
"name": "esbuild-sass-plugin", | ||
"version": "1.4.10", | ||
"version": "1.4.11", | ||
"description": "esbuild plugin for sass/scss files supporting both css loader and css result import (lit-element)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -197,3 +197,3 @@ import {Loader, OnLoadArgs, OnLoadResult, OnResolveArgs, Plugin} from "esbuild"; | ||
const watchFilesCache = "watch" in build.initialOptions ? {} : null; | ||
const lastWatchFiles = build.initialOptions.watch ? {} : null; | ||
@@ -207,4 +207,4 @@ async function transform(path: string, type: string): Promise<OnLoadResult> { | ||
watchFiles = [...watchFiles]; | ||
if (watchFilesCache) { | ||
watchFilesCache[path] = watchFiles; | ||
if (lastWatchFiles) { | ||
lastWatchFiles[path] = watchFiles; | ||
} | ||
@@ -225,3 +225,3 @@ return type === "css" ? { | ||
errors: [{text: err.message}], | ||
watchFiles: watchFilesCache?.[path] ?? [path] | ||
watchFiles: lastWatchFiles?.[path] ?? [path] | ||
} | ||
@@ -228,0 +228,0 @@ } |
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
43038