esbuild-sass-plugin
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1
@@ -0,0 +0,0 @@ import { OnLoadResult } from "esbuild"; |
@@ -0,0 +0,0 @@ "use strict"; |
import { Plugin } from "esbuild"; | ||
import { SassPluginOptions } from "./index"; | ||
export declare function sassPlugin(options?: SassPluginOptions): Plugin; |
@@ -84,3 +84,3 @@ "use strict"; | ||
load(canonicalUrl) { | ||
const filename = canonicalUrl.pathname.slice(1); | ||
const filename = path_1.sep === "/" ? canonicalUrl.pathname : canonicalUrl.pathname.slice(1); | ||
let contents = fs.readFileSync(filename, "utf8"); | ||
@@ -105,3 +105,3 @@ if (options.precompile) { | ||
else if (url.startsWith("file://")) { | ||
filename = url.slice(8); | ||
filename = path_1.sep === "/" ? url.slice(7) : url.slice(8); | ||
} | ||
@@ -108,0 +108,0 @@ else { |
@@ -0,0 +0,0 @@ import { Type } from "./index"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "esbuild-sass-plugin", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0-alpha.1", | ||
"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", |
@@ -0,0 +0,0 @@  |
@@ -0,0 +0,0 @@ import {OnLoadResult} from "esbuild" |
@@ -88,3 +88,3 @@ import {OnLoadArgs, OnLoadResult, OnResolveArgs, Plugin} from "esbuild" | ||
load(canonicalUrl: URL): ImporterResult | null { | ||
const filename = canonicalUrl.pathname.slice(1) | ||
const filename = sep === "/" ? canonicalUrl.pathname : canonicalUrl.pathname.slice(1) | ||
let contents = fs.readFileSync(filename, "utf8") | ||
@@ -108,3 +108,3 @@ if (options.precompile) { | ||
} else if (url.startsWith("file://")) { | ||
filename = url.slice(8) | ||
filename = sep === "/" ? url.slice(7) : url.slice(8) | ||
} else { | ||
@@ -111,0 +111,0 @@ filename = url |
@@ -0,0 +0,0 @@ import {Type} from "./index" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
51967