Skip to content

Commit 54b80f7

Browse files
committed
chore: add support for HMR env flag
1 parent 36a6a6b commit 54b80f7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
"type": "module",
77
"license": "MIT",
88
"packageManager": "[email protected]",
9-
"engines": {
10-
"pnpm": "^9.0.0"
11-
},
9+
1210
"repository": {
1311
"type": "git",
1412
"url": "git+https://github.com/sveltejs/svelte.git"

packages/svelte/tests/runtime-legacy/shared.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ async function common_setup(cwd: string, runes: boolean | undefined, config: Run
147147
runes
148148
};
149149

150+
if (process.env.HMR) {
151+
compileOptions.dev = true;
152+
compileOptions.hmr = true;
153+
}
154+
150155
// load_compiled can be used for debugging a test. It means the compiler will not run on the input
151156
// so you can manipulate the output manually to see what fixes it, adding console.logs etc.
152157
if (!config.load_compiled) {

0 commit comments

Comments
 (0)