generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
razzle.extend.js
34 lines (27 loc) · 937 Bytes
/
razzle.extend.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const path = require('path');
const plugins = (defaultPlugins) => {
return defaultPlugins;
};
const modify = (config, { target, dev }, webpack) => {
const themeConfigPath = `${__dirname}/theme/theme.config`;
const { alias } = config.resolve;
alias['../../theme.config$'] = themeConfigPath;
alias['../../theme.config'] = themeConfigPath;
const designSystem = '@eeacms/volto-eea-design-system';
const designSystemPath =
config.resolve.alias[designSystem] ||
path.dirname(require.resolve(designSystem));
const themeLessPath = path.resolve(`${designSystemPath}/../theme`);
alias['eea-design-system-theme'] = `${themeLessPath}/themes/eea`;
const semanticLessPath = path.dirname(
require.resolve('semantic-ui-less/package.json'),
);
alias['eea-volto-theme-folder'] = alias['eea-volto-themes']
? themeLessPath
: semanticLessPath;
return config;
};
module.exports = {
plugins,
modify,
};