Skip to content

Commit f4e47a3

Browse files
committed
chore: stylesheet for demo page also depends on env
1 parent 18415a9 commit f4e47a3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

demo/index.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
<!-- YASGUI CSS -->
1919
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@matdata/[email protected]/build/yasgui.min.css">
20-
21-
<!-- Table Plugin CSS -->
22-
<link rel="stylesheet" href="../dist/table-plugin.css">
23-
20+
2421
<style>
2522
body {
2623
font-family: Arial, sans-serif;
@@ -146,6 +143,14 @@ <h2 onclick="toggleInstructions()">
146143
// Detect if running in Vite dev server (module system available)
147144
const isViteDev = import.meta.env?.DEV;
148145

146+
// Load appropriate CSS based on environment
147+
const cssPath = isViteDev ? '../dist/yasgui-table-plugin.css' : 'dist/yasgui-table-plugin.css';
148+
const cssLink = document.createElement('link');
149+
cssLink.rel = 'stylesheet';
150+
cssLink.href = cssPath;
151+
document.head.appendChild(cssLink);
152+
console.log(`📄 Loading CSS from: ${cssPath}`);
153+
149154
let pluginLoaded = false;
150155

151156
if (isViteDev) {

0 commit comments

Comments
 (0)