-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-overrides.js
39 lines (36 loc) · 1.25 KB
/
config-overrides.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
35
36
37
38
39
const SassRuleRewire = require('react-app-rewire-sass-rule')
const path = require('path')
const rewireAliases = require('react-app-rewire-aliases')
module.exports = function override(config, env) {
require('react-app-rewire-postcss')(config, {
plugins: loader => [require('postcss-rtl')()]
})
config = rewireAliases.aliasesOptions({
'@src': path.resolve(__dirname, 'src'),
'@helpers': path.resolve(__dirname, 'src/helpers'),
'@assets': path.resolve(__dirname, 'src/@core/assets'),
'@components': path.resolve(__dirname, 'src/@core/components'),
'@layouts': path.resolve(__dirname, 'src/@core/layouts'),
'@store': path.resolve(__dirname, 'src/store'),
'@styles': path.resolve(__dirname, 'src/@core/scss'),
'@configs': path.resolve(__dirname, 'src/configs'),
'@utils': path.resolve(__dirname, 'src/utility/Utils'),
'@hooks': path.resolve(__dirname, 'src/utility/hooks')
})(config, env)
config = new SassRuleRewire()
.withRuleOptions({
test: /\.s[ac]ss$/i,
use: [
{
loader: 'sass-loader',
options: {
sassOptions: {
includePaths: ['node_modules', 'src/assets']
}
}
}
]
})
.rewire(config, env)
return config
}