fix(nitro): watch .mjs and .cjs extensions (closes #352)

This commit is contained in:
Pooya Parsa 2021-07-22 16:25:26 +02:00
parent 77874bf4d2
commit 7fee983b52

View File

@ -93,7 +93,7 @@ export function createDevServer (nitroContext: NitroContext) {
} }
// Watch for dist and reload worker // Watch for dist and reload worker
const pattern = '**/*.{js,json}' const pattern = '**/*.{js,json,cjs,mjs}'
const events = ['add', 'change'] const events = ['add', 'change']
let watcher: FSWatcher let watcher: FSWatcher
function watch () { function watch () {