Skip to content

Commit 36da5e2

Browse files
author
Barthelemy Ledoux
committed
fix: make imports with dashes work
1 parent a6b8d33 commit 36da5e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markDownPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const addVueLive = md => {
3131
// put all requires into a "requires" object
3232
// add this as a prop
3333
const scr = getScript(code);
34-
const requires = getImports(scr).map(mod => `${mod}: require('${mod}')`);
34+
const requires = getImports(scr).map(mod => `'${mod}': require('${mod}')`);
3535

3636
return `<vue-live :code="\`${md.utils
3737
.escapeHtml(code)

0 commit comments

Comments
 (0)