Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy committed Oct 8, 2024
1 parent 3628569 commit 2a33d55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
14 changes: 0 additions & 14 deletions .env.example

This file was deleted.

26 changes: 2 additions & 24 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ const cssThemes = {
"theme-dark-custom": "./node_modules/matrix-react-sdk/res/themes/dark-custom/css/dark-custom.pcss",
};

function getActiveThemes() {
// Default to `light` theme when the MATRIX_THEMES environment variable is not defined.
const theme = process.env.MATRIX_THEMES ?? "light";
return theme
.split(",")
.map((x) => x.trim())
.filter(Boolean);
}

// See docs/customisations.md
let fileOverrides = {
/* {[file: string]: string} */
Expand Down Expand Up @@ -129,19 +120,6 @@ module.exports = (env, argv) => {
const reactSdkSrcDir = path.resolve(require.resolve("matrix-react-sdk/package.json"), "..", "src");
const jsSdkSrcDir = path.resolve(require.resolve("matrix-js-sdk/package.json"), "..", "src");

const ACTIVE_THEMES = getActiveThemes();
function getThemesImports() {
const imports = ACTIVE_THEMES.map((t) => {
return cssThemes[`theme-${t}`].replace("./node_modules/", ""); // theme import path
});
const s = JSON.stringify(ACTIVE_THEMES);
return `
window.MX_insertedThemeStylesCounter = 0;
window.MX_DEV_ACTIVE_THEMES = (${s});
${imports.map((i) => `import("${i}")`).join("\n")};
`;
}

return {
...development,

Expand Down Expand Up @@ -598,8 +576,8 @@ module.exports = (env, argv) => {

// This exports our CSS using the splitChunks and loaders above.
new MiniCssExtractPlugin({
filename: "bundles/[name].css",
chunkFilename: "bundles/[name].css",
filename: "bundles/[fullhash]/[name].css",
chunkFilename: "bundles/[fullhash]/[name].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),

Expand Down

0 comments on commit 2a33d55

Please sign in to comment.