Skip to content

Commit

Permalink
fix(entry): compatible with jsx (#6586)
Browse files Browse the repository at this point in the history
Co-authored-by: Belinda Cao <[email protected]>
  • Loading branch information
yimingjfe and caohuilin authored Nov 29, 2024
1 parent e220a13 commit 8ffaedb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/thin-toes-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/runtime': patch
---

fix(entry): compatible with jsx
fix(entry): 兼容 jsx
4 changes: 2 additions & 2 deletions packages/runtime/plugin-runtime/src/cli/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ import App from '${
formatImportPath(
customEntry
? entry
.replace('entry.tsx', 'App')
.replace(/entry\.[tj]sx/, 'App')
.replace(srcDirectory, internalSrcAlias)
: entry.replace(srcDirectory, internalSrcAlias).replace('.tsx', ''),
: entry.replace(srcDirectory, internalSrcAlias).replace(/\.[tj]sx/, ''),
)
}';
Expand Down

0 comments on commit 8ffaedb

Please sign in to comment.