Skip to content

Commit 1e73db4

Browse files
committed
2 parents ee9ed9c + 1c4687b commit 1e73db4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dist/index.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,11 +2165,19 @@ function docusaurusPluginResistogram(ctx, opts = {}) {
21652165
pluginId
21662166
);
21672167
(0, import_fs_extra.ensureDirSync)(pluginDataDir);
2168+
const isProd = process.env.NODE_ENV === "production";
21682169
return {
21692170
name: "docusaurus-plugin-resistogram",
21702171
getThemePath() {
21712172
return path.resolve(__dirname, "./theme");
21722173
},
2174+
// Explicitly add the theme's stylesheet to the client modules only for the production build.
2175+
// This is a workaround for an issue where the styles are not being picked up automatically
2176+
// in the production build. In development, this is disabled to allow for hot-reloading
2177+
// and correct dark mode behavior.
2178+
getClientModules() {
2179+
return isProd ? [path.resolve(__dirname, "./theme/ResistanceTable/styles.module.css")] : [];
2180+
},
21732181
async contentLoaded({ actions }) {
21742182
const { abx, org, sources, hierarchicalSources, allAbxIds, allOrgIds, orgClasses, orgIdToRank, abxSyn2Id, orgSyn2Id } = await getSharedData(dataPath, files);
21752183
const resistanceDataFileNames = /* @__PURE__ */ new Map();

0 commit comments

Comments
 (0)