Skip to content

Commit

Permalink
flatten manifest into async module script
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-ebey committed Aug 8, 2022
1 parent 984f454 commit fac8b27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,8 @@ export function Scripts(props: ScriptProps) {
let routeModulesScript = `${matches
.map(
(match, index) =>
`import * as route${index} from ${JSON.stringify(
`import ${JSON.stringify(manifest.url)};
import * as route${index} from ${JSON.stringify(
manifest.routes[match.route.id].module
)};`
)
Expand All @@ -815,7 +816,6 @@ import(${JSON.stringify(manifest.entry.module)});`;
dangerouslySetInnerHTML={createHtml(contextScript)}
type={undefined}
/>
<script {...props} type={undefined} src={manifest.url} />
<script
{...props}
dangerouslySetInnerHTML={createHtml(routeModulesScript)}
Expand Down

0 comments on commit fac8b27

Please sign in to comment.