Skip to content

Commit

Permalink
fix: add process.cwd to css plugin resolution path
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinando-ferreira committed May 9, 2021
1 parent fe9da97 commit 63a96c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ function loadPreprocessor(lang: PreprocessLang, root: string): any {
return loadedPreprocessors[lang]
}
try {
const resolved = require.resolve(lang, { paths: [root] })
const resolved = require.resolve(lang, { paths: [root, process.cwd()] })
return (loadedPreprocessors[lang] = require(resolved))
} catch (e) {
throw new Error(
Expand Down

0 comments on commit 63a96c8

Please sign in to comment.