-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
need feedbackAwaiting author responseAwaiting author responsetopic: themeRelates to VuePress themeRelates to VuePress theme
Description
- I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
- create a file 'config.styl'
$textColor = #000000
- edit file '.vuepress/config.js`
{
stylus: {
import: ['config.styl']
}
}
What is expected?
initialized $textColor
#2c3e50
is replaced with #000000
What is actually happening?
nothing happens
Other relevant information
look up code in file @vuepress/core/lib/node/internal-plugins/palette/index.js
10 // 1. enable config.styl globally.
11 const configFile = ctx.getLibFilePath('client/style/config.styl')
12 if (!ctx.siteConfig.stylus) {
13 ctx.siteConfig.stylus = {
14 import: [configFile]
15 }
16 } else if (isPlainObject(ctx.siteConfig.stylus)) {
17 ctx.siteConfig.stylus.import = (ctx.siteConfig.stylus.import || []).concat([configFile])
18 }
I propose to amend the 17th lines of code
ctx.siteConfig.stylus.import = [configFile].concat(ctx.siteConfig.stylus.import || [])
Metadata
Metadata
Assignees
Labels
need feedbackAwaiting author responseAwaiting author responsetopic: themeRelates to VuePress themeRelates to VuePress theme