esbuild-sass-plugin
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -182,3 +182,13 @@ "use strict"; | ||
opts.paths[0] = basedir; | ||
return require.resolve(id, opts); | ||
let resolved = require.resolve(id, opts); | ||
if (resolved.endsWith('.js')) { | ||
resolved = resolved.slice(0, -3) + '.scss'; | ||
if (!(0, fs_1.existsSync)(resolved)) { | ||
resolved = resolved.slice(0, -5) + '.sass'; | ||
if (!(0, fs_1.existsSync)(resolved)) { | ||
resolved = resolved.slice(0, -5) + '.css'; | ||
} | ||
} | ||
} | ||
return resolved; | ||
} | ||
@@ -185,0 +195,0 @@ catch (ignored) { |
{ | ||
"name": "esbuild-sass-plugin", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"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", |
@@ -109,3 +109,3 @@ ![cooltext394785080075403](https://user-images.githubusercontent.com/160981/136289874-26ce7269-ea08-47dd-be31-9bf0ef7a0b8d.png) | ||
| transform | function | undefined | | ||
| [loadPaths](https://www.shorturl.at/bdpBS) | string[] | [] | | ||
| [loadPaths](https://sass-lang.com/documentation/js-api/interfaces/Options#loadPaths) | string[] | [] | | ||
| precompile | function | undefined | | ||
@@ -112,0 +112,0 @@ | importMapper | function | undefined | |
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
50299
553