Skip to content

Commit

Permalink
fix(css): ensure options for .styl
Browse files Browse the repository at this point in the history
fix #1351
  • Loading branch information
yyx990803 committed Jan 5, 2021
1 parent 68eac64 commit b3237ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ async function compileCSS(
// 2. pre-processors: sass etc.
if (lang && lang in preProcessors) {
const preProcessor = preProcessors[lang as PreprocessLang]
let opts = preprocessorOptions && preprocessorOptions[lang]
let opts = (preprocessorOptions && preprocessorOptions[lang]) || {}
// support @import from node dependencies by default
switch (lang) {
case 'scss':
Expand All @@ -317,6 +317,7 @@ async function compileCSS(
}
break
case 'less':
case 'styl':
case 'stylus':
opts = {
paths: ['node_modules'],
Expand Down

0 comments on commit b3237ff

Please sign in to comment.