generated from SoftwareBrothers/adminjs-feature-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
If a theme is defined as per this piece of documentation
import path from 'path';
import * as url from 'url';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
// ...
const myCustomTheme = {
id: 'my-custom-theme',
name: 'My Custom Theme',
overrides: {
colors: {
primary100: 'teal',
},
},
bundlePath: `${path.join(__dirname, `../themes/my-custom-theme`)}/theme.bundle.js`,
stylePath: `${path.join(__dirname, `../themes/my-custom-theme`)}/style.css`,
}
// *And then said theme is added to the AdminJS instance
const admin = new AdminJS({
defaultTheme: myCustomTheme.id,
availableThemes: [myCustomTheme],
})When everything is bundled with
(async () => {
await bundle({
componentLoader,
destinationDir: "public",
});
})();The CSS files will not be carried over.
You can reproduce it not only with a custom theme but also using any default theme from @adminjs/themes, for instance:
import {dark} from "@adminjs/themes";
const admin = new AdminJS({
defaultTheme: dark.id,
availableThemes: [dark],
})And you will see that when running in development the colors will show correctly, whilst when building and running in production the font colors of the navbar will be off (black over black in the above case) as the style.css from the dark theme is not actually bundled and served.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels