Skip to content

Commit

Permalink
fix: react async import mode (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
shkreios committed Mar 15, 2022
1 parent c5b5421 commit 7c8f4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function stringifyRoutes(
return str.replace(replaceStr, importName)
} else {
if (options.resolver === 'react')
return str.replace(replaceStr, `React.lazy(() => import('${path}'))`)
return str.replace(replaceStr, `React.createElement(React.lazy(() => import('${path}')))`)
else if (options.resolver === 'solid')
return str.replace(replaceStr, `Solid.lazy(() => import('${path}'))`)
else
Expand Down

0 comments on commit 7c8f4b9

Please sign in to comment.