Skip to content

Commit

Permalink
add custom default theme
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap committed Jun 26, 2024
1 parent 13e965a commit ff55baf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions prod-webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require("path");

const themeEntries = require('./MapStore2/build/themes.js').themeEntries;
const extractThemesPlugin = require('./MapStore2/build/themes.js').extractThemesPlugin;
const ModuleFederationPlugin = require('./MapStore2/build/moduleFederation').plugin;
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand All @@ -18,7 +17,9 @@ module.exports = require('./MapStore2/build/buildConfig')({
'geostory-embedded': path.join(__dirname, "js", "geostoryEmbedded"),
"dashboard-embedded": path.join(__dirname, "js", "dashboardEmbedded")
},
themeEntries,
themeEntries: {
"themes/default": path.join(__dirname, "themes", "default", "theme.less")
},
paths,
plugins: [extractThemesPlugin, ModuleFederationPlugin],
prod: true,
Expand Down
2 changes: 2 additions & 0 deletions themes/default/theme.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import '../../MapStore2/web/client/themes/default/theme.less';
@import './variables.less';
1 change: 1 addition & 0 deletions themes/default/variables.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@ms-primary: #4349ff;
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require("path");

const themeEntries = require('./MapStore2/build/themes.js').themeEntries;
const extractThemesPlugin = require('./MapStore2/build/themes.js').extractThemesPlugin;
const ModuleFederationPlugin = require('./MapStore2/build/moduleFederation').plugin;

Expand All @@ -12,7 +11,9 @@ module.exports = require('./MapStore2/build/buildConfig')({
'geostory-embedded': path.join(__dirname, "js", "geostoryEmbedded"),
"dashboard-embedded": path.join(__dirname, "js", "dashboardEmbedded")
},
themeEntries,
themeEntries: {
"themes/default": path.join(__dirname, "themes", "default", "theme.less")
},
paths: {
base: __dirname,
dist: path.join(__dirname, "dist"),
Expand Down

0 comments on commit ff55baf

Please sign in to comment.