Skip to content

Commit

Permalink
fix(project): Proper paths if volto-eea-design-system package is not …
Browse files Browse the repository at this point in the history
…installed, but in development #270 from eea/correct_paths
  • Loading branch information
ichim-david committed Dec 8, 2022
2 parents b9c530b + 7a2655f commit 0f8ee8d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions razzle.extend.js
Expand Up @@ -7,8 +7,13 @@ const modify = (config, { target, dev }, webpack) => {
config.resolve.alias['../../theme.config$'] = themeConfigPath;
config.resolve.alias['../../theme.config'] = themeConfigPath;

const projectRootPath = path.resolve('.');
const themesPath = `${projectRootPath}/node_modules/@eeacms/volto-eea-design-system/theme/themes`;
const designSystem = '@eeacms/volto-eea-design-system';
const designSystemPath =
config.resolve.alias[designSystem] ||
path.dirname(require.resolve(designSystem));
const themeLessPath = path.resolve(`${designSystemPath}/../theme`);

const themesPath = `${themeLessPath}/themes`;

config.resolve.alias['eea-volto-themes'] = themesPath;
config.resolve.alias['ui-theme'] = `${themesPath}/eea/`;
Expand Down

0 comments on commit 0f8ee8d

Please sign in to comment.