Skip to content

Commit

Permalink
fix: works with @vitejs/plugin-vue2 #49
Browse files Browse the repository at this point in the history
  • Loading branch information
yejimeiming committed Sep 16, 2024
1 parent 4f0a307 commit 7c9ee77
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"acorn": "^8.8.2",
"fast-glob": "^3.2.12",
"magic-string": "^0.30.1",
"vite-plugin-dynamic-import": "^1.5.0"
"vite-plugin-dynamic-import": "^1.6.0"
},
"devDependencies": {
"@types/node": "^18.16.2",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ async function transformCommonjs({
].join(' '))
}
if (runtimes.length) {
ms.append(runtimes.join('\n'))
ms.append(/* #49 */'\n' + runtimes.join('\n'))
}
}

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/__snapshots__/dynamic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}
export const hello = `[dynamic.tsx] ${load("hello.cjs").default}`;
export const world = `[dynamic.tsx] ${load("world.cjs").default}`;

function __matchRequireRuntime0__(path) {
switch(path) {
case '@/module-exports/hello':
Expand Down

0 comments on commit 7c9ee77

Please sign in to comment.