Skip to content

Commit

Permalink
fix: import specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 committed Sep 10, 2024
1 parent cfccffc commit 8b39619
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loaders/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function emitDemo(
const entryFileName = Object.keys(demo.asset.dependencies)[0];
demoDepsMap[demo.id] ??= {};
Object.keys(demo.resolveMap).forEach((key, index) => {
const specifier = `${demo.id.replace(/-/g, '_')}_deps_${index}`;
const specifier = `${demo.id.replace(/[^\w\d]/g, '_')}_deps_${index}`;
if (key !== entryFileName) {
const normalizedKey = isRelativePath(key)
? winPath(demo.resolveMap[key])
Expand Down

0 comments on commit 8b39619

Please sign in to comment.