Skip to content

Commit 363b3ee

Browse files
committed
use a regex instead
a less hacky hack
1 parent d690232 commit 363b3ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dev-server-hmr/src/HmrPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class HmrPlugin implements Plugin {
9090
/** @inheritDoc */
9191
async transformImport({ source, context }: { source: string; context: Context }) {
9292
// Can't possibly handle computed dynamic imports
93-
if (source.includes('${')) {
93+
if (!/^"[^"]*"|'[^']*'|`[^`]*`/.test(source)) {
9494
return;
9595
}
9696

0 commit comments

Comments
 (0)