Closed
Description
Feature request
What problem does this feature solve?
VuePress resolves theme by using path as vuepress-theme-${siteConfig.theme}/Layout.vue
.
But for some security reason, some companies have their own npm registry
. And the VuePress themes using in the company should only publish in the private npm registry
. For no conflict with the public npm registry, the private npm packages published in the company should with a scope like @cip/vuepress-theme-security
.
What does the proposed API look like?
in .vuepress/config.js
module.exports = {
themeConfig:{
layoutPath: `@cip/vuepress-theme-security`
}
}
How should this be implemented in your opinion?
// resolve theme
const useDefaultTheme = (
!siteConfig.theme &&
!siteConfig.layoutPath &&
!fs.existsSync(path.resolve(vuepressDir, 'theme'))
)
// prepare.js
try {
const layoutPath = siteConfig.layoutPath? `${siteConfig.layoutPath}/Layout.vue`
: `vuepress-theme-${siteConfig.theme}/Layout.vue`
themeLayoutPath = require.resolve(layoutPath, {
paths: [
path.resolve(__dirname, '../node_modules'),
path.resolve(sourceDir)
]
})
themePath = path.dirname(themeLayoutPath)
}
Are you willing to work on this yourself?**
I'm not sure.