Skip to content

Commit 2e3fff4

Browse files
committed
fix: register edge templates under metaFiles to be copied in prod build
1 parent 164775e commit 2e3fff4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

commands/configure.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default class Configure extends BaseCommand {
7979
const codemods = await this.createCodemods()
8080
await codemods.updateRcFile((rcFile) => {
8181
rcFile.addProvider('@adonisjs/core/providers/edge_provider')
82+
rcFile.addMetaFile('resources/views/**/*.edge', false)
8283
})
8384
}
8485

tests/commands/configure.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,5 +518,12 @@ test.group('Configure command | vinejs', () => {
518518
])
519519

520520
await assert.fileContains('adonisrc.ts', '@adonisjs/core/providers/edge_provider')
521+
await assert.fileContains(
522+
'adonisrc.ts',
523+
`metaFiles: [{
524+
pattern: 'resources/views/**/*.edge',
525+
reloadServer: false,
526+
}]`
527+
)
521528
})
522529
})

0 commit comments

Comments
 (0)