Skip to content

Commit 376154b

Browse files
committed
Build fixes
1 parent 771663b commit 376154b

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

build.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,8 @@ window.NumericSlider = NumericSlider;
107107
write: false, // Don't write, we'll handle it manually
108108
});
109109

110-
// Get the bundled code
111-
let bundled = result.outputFiles[0].text;
112-
113-
// Ensure window exposure is present (it should be from the entry file)
114-
if (!bundled.includes('window.Dropdown')) {
115-
bundled += '\nwindow.Dropdown = Dropdown;';
116-
}
117-
if (!bundled.includes('window.NumericSlider')) {
118-
bundled += '\nwindow.NumericSlider = NumericSlider;';
119-
}
120-
110+
// Get the bundled code - esbuild handles window exposure via the entry file
111+
const bundled = result.outputFiles[0].text;
121112
fs.writeFileSync(path.join(DIST_CLIENT_DIR, 'design-system.bundle.js'), bundled);
122113
} finally {
123114
// Clean up temp file
@@ -157,7 +148,7 @@ function createProductionHtml() {
157148
html = html.replace(/<script[^>]*src="[^"]+"[^>]*><\/script>\s*/g, '');
158149

159150
// Remove all CSS link tags
160-
html = html.replace(/<link rel="stylesheet" href="[^"]+\.css"[^>]*\/>\s*/g, '');
151+
html = html.replace(/<link rel="stylesheet" href="[^"]+\.css"[^>]*>\s*/g, '');
161152

162153
// Insert bundled CSS before </head>
163154
html = html.replace('</head>', ' <link rel="stylesheet" href="./styles.bundle.css" />\n</head>');

client/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- Fonts (Work Sans from Google, Founders Grotesk via typography.css) -->
99
<link rel="preconnect" href="https://fonts.googleapis.com">
1010
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11-
<link href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
11+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Work+Sans:wght@400;500;600;700&display=swap">
1212

1313
<!-- Design System Foundations -->
1414
<link rel="stylesheet" href="./design-system/colors/colors.css">
@@ -23,11 +23,11 @@
2323
<link rel="stylesheet" href="./design-system/components/numeric-slider/numeric-slider.css">
2424

2525
<!-- App-specific overrides -->
26-
<link rel="stylesheet" href="./bespoke.css" />
27-
<link rel="stylesheet" href="./layout.css" />
28-
<link rel="stylesheet" href="./vector-mode.css" />
29-
<link rel="stylesheet" href="./matrix-mode.css" />
30-
<link rel="stylesheet" href="./tensor-mode.css" />
26+
<link rel="stylesheet" href="./bespoke.css">
27+
<link rel="stylesheet" href="./layout.css">
28+
<link rel="stylesheet" href="./vector-mode.css">
29+
<link rel="stylesheet" href="./matrix-mode.css">
30+
<link rel="stylesheet" href="./tensor-mode.css">
3131
</head>
3232

3333
<body class="bespoke">

0 commit comments

Comments
 (0)