Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

Commit

Permalink
fix HMR for Static bundle importing resources (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon authored Jun 6, 2021
1 parent e86f185 commit 1eab4de
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ function pluginI18n(
}
},

async handleHotUpdate({ file, server }) {
if (/\.(json5?|ya?ml)$/.test(file)) {
const module = server.moduleGraph.getModuleById(
INTLIFY_BUNDLE_IMPORT_ID
)
if (module) {
server.moduleGraph.invalidateModule(module)
return [module!]
}
}
},

async transform(code: string, id: string) {
const { filename, query } = parseVueRequest(id)
debug('transform', id, JSON.stringify(query))
Expand Down

0 comments on commit 1eab4de

Please sign in to comment.