Skip to content

Commit

Permalink
fix: register edge templates under metaFiles to be copied in prod build
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Oct 18, 2023
1 parent 164775e commit 2e3fff4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions commands/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class Configure extends BaseCommand {
const codemods = await this.createCodemods()
await codemods.updateRcFile((rcFile) => {
rcFile.addProvider('@adonisjs/core/providers/edge_provider')
rcFile.addMetaFile('resources/views/**/*.edge', false)
})
}

Expand Down
7 changes: 7 additions & 0 deletions tests/commands/configure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,5 +518,12 @@ test.group('Configure command | vinejs', () => {
])

await assert.fileContains('adonisrc.ts', '@adonisjs/core/providers/edge_provider')
await assert.fileContains(
'adonisrc.ts',
`metaFiles: [{
pattern: 'resources/views/**/*.edge',
reloadServer: false,
}]`
)
})
})

0 comments on commit 2e3fff4

Please sign in to comment.