Skip to content

Commit

Permalink
chore(markdown): add src alias for code imports
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Jun 5, 2022
1 parent ba4fac5 commit d31e824
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/.vuepress/configs/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const { path } = require('@vuepress/utils')
module.exports = {
importCode: {
handleImportPath: (str) =>
str.replace(/^@examples/, path.resolve(__dirname, '../examples')),
str
.replace(/^@examples/, path.resolve(__dirname, '../examples'))
.replace(/^@src/, path.resolve(__dirname, '../../../src')),
}
}

0 comments on commit d31e824

Please sign in to comment.