Run the plugin before svelte

This commit is contained in:
Ariadna 2025-05-15 03:30:53 -04:00
parent ec73af5618
commit e75f41f7f1
Signed by: ari
SSH key fingerprint: SHA256:j4xpQafvRcIH4rwZqM5aREIogWsCjyYohia7vH0+uZY

View file

@ -9,6 +9,7 @@ export const themePlugin = (): Plugin => {
console.log(`Using theme file: ${themeFile}`); console.log(`Using theme file: ${themeFile}`);
return { return {
name: 'theme-generator', name: 'theme-generator',
enforce: 'pre', // Ensure this plugin runs first
transform(code, id) { transform(code, id) {
if (id.endsWith('app.css')) { if (id.endsWith('app.css')) {
const colorsCode = Deno.readTextFileSync(Deno.cwd() + '/src/themes/colors.css'); const colorsCode = Deno.readTextFileSync(Deno.cwd() + '/src/themes/colors.css');