mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-11 22:36:59 +10:00
22 lines
636 B
JavaScript
22 lines
636 B
JavaScript
const { path } = require('@vuepress/shared-utils')
|
|
const { codegen: { pathsToModuleCode }} = require('@vuepress/shared-utils')
|
|
|
|
module.exports = (options, context, api) => ({
|
|
name: '@vuepress/internal-root-mixins',
|
|
|
|
// @internal/root-mixins
|
|
async clientDynamicModules () {
|
|
const builtInRootMixins = [
|
|
path.resolve(__dirname, '../app/root-mixins/updateMeta.js')
|
|
]
|
|
|
|
const rootMixins = [
|
|
...builtInRootMixins,
|
|
...api.options.clientRootMixin.values
|
|
]
|
|
|
|
const rootMixinsCode = pathsToModuleCode(rootMixins)
|
|
return { name: 'root-mixins.js', content: rootMixinsCode, dirname: 'internal' }
|
|
}
|
|
})
|