Skip to content

Commit 0331bd2

Browse files
committed
fixup! feat: [ts-starter #9] create a minimal bootstrap entry point
1 parent a10107b commit 0331bd2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ const App = lazy(async () => import("./App"));
66

77
export default function Index(): ReactElement {
88
return (
9-
<ErrorBoundary fallback={<div>shit hit the fan bruv!</div>}>
9+
<ErrorBoundary FallbackComponent={Fallback}>
1010
<Suspense fallback="loading">
1111
<App />
1212
</Suspense>
1313
</ErrorBoundary>
1414
);
1515
}
16+
17+
function Fallback({ error }: { error: Error }): ReactElement {
18+
return <p>{error.message}</p>;
19+
}

webpack.config.mjs

+7-4
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,13 @@ function webpackConfig(_env, { mode = "development" }) {
9494
}),
9595
isDevelopment && new ReactRefreshWebpackPlugin(),
9696
].filter(Boolean),
97-
performance: {
98-
maxEntrypointSize: 150000,
99-
hints: "warning",
100-
},
97+
performance:
98+
mode === "production"
99+
? {
100+
maxEntrypointSize: 200000,
101+
hints: "warning",
102+
}
103+
: undefined,
101104
};
102105
}
103106

0 commit comments

Comments
 (0)