Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Commit cd986fe

Browse files
authored
Fix Webpack hot module replacement not working (#698)
1 parent 33d4fb7 commit cd986fe

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: __tests__/__snapshots__/test.spec.ts.snap

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ shared-photos =
4949
*[other] their stream
5050
}.\`)
5151
if (module.hot) {
52+
delete target._fluent
5253
if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
5354
// Vue 3
5455
const id = target.__hmrId

Diff for: src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function generateCode (rawData: string, query: OptionObject, hot = false): strin
1212

1313
const hotCode = hot
1414
? `if (module.hot) {
15+
delete target._fluent
1516
if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
1617
// Vue 3
1718
const id = target.__hmrId

0 commit comments

Comments
 (0)