Skip to content

Commit 20a7cde

Browse files
committed
fix: bootstrap css not loading
1 parent c63e186 commit 20a7cde

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

root/layout/components/Head.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import escapeClosingTags from '../../utility/escapeClosingTags.js';
2323
import FaviconLinks from './FaviconLinks.js';
2424
import globalsScript from './globalsScript.mjs';
2525
import MetaDescription from './MetaDescription.js';
26+
import bootstrapCssUrl from 'bootstrap/dist/css/bootstrap.css';
2627

2728
const canonRegexp = new RegExp('^(https?:)?//' + WEB_SERVER);
2829
function canonicalize(url: string) {
@@ -97,7 +98,7 @@ component Head(
9798

9899
{isHomepage && (
99100
<link
100-
href="/static/build/bootstrap.css"
101+
href={bootstrapCssUrl}
101102
rel="stylesheet"
102103
type="text/css"
103104
/>

root/static/scripts/homepage/navbar.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@ component Navbar() {
213213
}
214214
};
215215

216-
React.useEffect(() => {
217-
void import('bootstrap/dist/js/bootstrap.bundle.min.js');
218-
}, []);
219-
220216
return (
221217
<nav className="navbar navbar-expand-lg shadow-sm" aria-label="Offcanvas navbar large">
222218
<div className="container-fluid gap-4 position-relative layout-width">

webpack/server.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
* remove Flow and ESM syntax; this is also fine because it's free of
5858
* side-effects.
5959
*/
60-
allowlist: [/(jquery|mutate-cow|po2json|weight-balanced-tree)/],
60+
allowlist: [/(bootstrap|jquery|mutate-cow|po2json|weight-balanced-tree)/],
6161
modulesFromFile: true,
6262
}),
6363
],

0 commit comments

Comments
 (0)