Skip to content

Commit

Permalink
fix: single quote 'src' attribute for <script> (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
bates64 authored May 9, 2020
1 parent 6d2fabe commit 9336dac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/node/server/serverPluginModuleRewrite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export const moduleRewritePlugin: Plugin = ({ app, watcher, resolver }) => {
const srcAttr = openTag.match(srcRE)
if (srcAttr) {
// register script as a import dep for hmr
const importee = cleanUrl(slash(path.resolve('/', srcAttr[1])))
const importee = cleanUrl(
slash(path.resolve('/', srcAttr[1] || srcAttr[2]))
)
debugHmr(` ${importer} imports ${importee}`)
ensureMapEntry(importerMap, importee).add(importer)
}
Expand Down

0 comments on commit 9336dac

Please sign in to comment.