Skip to content

Commit

Permalink
fix: reserve keys for module options
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan Bansal committed Jan 3, 2025
1 parent cc3afc6 commit 93c75d2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ export default defineNuxtModule({
configKey: 'stonecrop',
},

setup(_options, _nuxt) {
defaults: nuxt => {
return {
router: {},
docbuilder: false,
}
},

setup(_options, nuxt) {
// add the base Stonecrop layout from the module
const layoutsDir = resolve('runtime/layouts')
const homeLayoutPath = resolve(layoutsDir, 'StonecropHome.vue')
addLayout(homeLayoutPath, 'home')

// find doctype schemas in the nuxt application and add them as pages
const rootDir = _nuxt.options.srcDir
const rootDir = nuxt.options.srcDir
const doctypesDir = resolve(rootDir, 'doctypes')
if (existsSync(doctypesDir)) {
const schemas = readdirSync(doctypesDir).filter(file => extname(file) === '.json')
Expand Down

0 comments on commit 93c75d2

Please sign in to comment.