We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
require.resolve.paths
1 parent 1f068fc commit c588b8fCopy full SHA for c588b8f
packages/vite/src/node/plugins/css.ts
@@ -989,7 +989,7 @@ function loadPreprocessor(lang: PreprocessLang, root: string): any {
989
try {
990
// Search for the preprocessor in the root directory first, and fall back
991
// to the default require paths.
992
- const fallbackPaths = require.resolve.paths(lang) || []
+ const fallbackPaths = require.resolve.paths?.(lang) || []
993
const resolved = require.resolve(lang, { paths: [root, ...fallbackPaths] })
994
return (loadedPreprocessors[lang] = require(resolved))
995
} catch (e) {
0 commit comments