Skip to content

Commit

Permalink
use a regex instead
Browse files Browse the repository at this point in the history
a less hacky hack
  • Loading branch information
43081j committed Oct 31, 2020
1 parent d690232 commit 363b3ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dev-server-hmr/src/HmrPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class HmrPlugin implements Plugin {
/** @inheritDoc */
async transformImport({ source, context }: { source: string; context: Context }) {
// Can't possibly handle computed dynamic imports
if (source.includes('${')) {
if (!/^"[^"]*"|'[^']*'|`[^`]*`/.test(source)) {
return;
}

Expand Down

0 comments on commit 363b3ee

Please sign in to comment.