-
Notifications
You must be signed in to change notification settings - Fork 1
/
craco.config.js
33 lines (32 loc) · 1.05 KB
/
craco.config.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
const CracoAlias = require('craco-alias');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
plugins: [
{
plugin: {
overrideWebpackConfig: ({ webpackConfig }) => {
webpackConfig.resolve.plugins.push(
new TsconfigPathsPlugin({
configFile: './tsconfig.base.json',
})
);
return webpackConfig;
},
},
},
{
plugin: CracoAlias,
options: {
source: 'tsconfig',
baseUrl: './src',
aliases: {
'@ei-ui-lib/hooks/*': ['@lib/hooks/*'],
'@ei-ui-lib/hooks': ['@lib/hooks'],
'@ei-ui-lib/components/*': ['@lib/components/*'],
'@ei-ui-lib/components': ['@lib/components'],
},
tsConfigPath: './tsconfig.base.json',
},
},
],
};