Skip to content

Commit

Permalink
Fix "Fix unchanged revision hashes when watching"
Browse files Browse the repository at this point in the history
The previous fix didn't care about Windows environment.
  • Loading branch information
kentaroi committed Aug 12, 2024
1 parent ab02fed commit 0cd8085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/compile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require("path");
const { posix: path } = require("path");
const url = require("url");

const sass = require("sass");
Expand All @@ -10,13 +10,13 @@ const getLoadPathsFixedSassOptions = require("./get-load-paths-fixed-sass-option
const debugDev = require("debug")("Dev:EleventySass:Compile");

const compile = async function(inputContent, inputPath, sassOptions, config, postcss) {
let parsed = path.posix.parse(inputPath);
let parsed = path.parse(inputPath);
if (parsed.name.startsWith("_")) {
debugDev(`Actually, didn't compile ${ inputPath }, because the filename starts with "_"`);
return;
}

let inputURL = url.pathToFileURL(path.posix.resolve(inputPath)).href;
let inputURL = url.pathToFileURL(path.resolve(inputPath)).href;

let stringOptions = getLoadPathsFixedSassOptions(sassOptions, parsed.dir, config);
stringOptions.url = inputURL;
Expand Down

0 comments on commit 0cd8085

Please sign in to comment.