Skip to content

Commit

Permalink
chore: import module with extension, avoid ts check issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lijifei committed Aug 18, 2023
1 parent 6588390 commit 95a1aa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
File renamed without changes.
5 changes: 2 additions & 3 deletions examples/mocks/src/retry-dynamic-import.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
export async function retryDynamicImport() {
let retryTimes = 0
const load = async () => {
try { // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
return await import('./dynamic-module')
try {
return await import('./dynamic-module.js')
}
catch (e) {
if (retryTimes === 3)
Expand Down

0 comments on commit 95a1aa8

Please sign in to comment.