Skip to content

Commit

Permalink
fix: crash when importing component with no script tag (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieumure authored May 4, 2020
1 parent f80ad1c commit 586626f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/serverPluginVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function compileSFCMain(
let hasScoped = false
let hasCSSModules = false
if (descriptor.styles) {
code += `import { updateStyle } from "${hmrClientId}"\n`
code += `\nimport { updateStyle } from "${hmrClientId}"\n`
descriptor.styles.forEach((s, i) => {
const styleRequest = publicPath + `?type=style&index=${i}`
if (s.scoped) hasScoped = true
Expand Down

0 comments on commit 586626f

Please sign in to comment.