You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const SassRuleRewire = require('react-app-rewire-sass-rule');
|
|
|
|
const { alias, configPaths } = require('react-app-rewire-alias');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = function override(config, env) {
|
|
|
|
require('react-app-rewire-postcss')(config, {
|
|
|
|
plugins: loader => [require('postcss-rtl')()]
|
|
|
|
});
|
|
|
|
|
|
|
|
// Tree Shaking 활성화
|
|
|
|
config.optimization.usedExports = true;
|
|
|
|
|
|
|
|
// 코드 스플리팅 설정
|
|
|
|
config.optimization.splitChunks = {
|
|
|
|
chunks: 'all'
|
|
|
|
};
|
|
|
|
|
|
|
|
config = new SassRuleRewire()
|
|
|
|
.withRuleOptions({
|
|
|
|
test: /\.s[ac]ss$/i,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'sass-loader',
|
|
|
|
options: {
|
|
|
|
sassOptions: {
|
|
|
|
includePaths: ['node_modules', 'src/assets']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
.rewire(config, env);
|
|
|
|
|
|
|
|
// Alias
|
|
|
|
config = alias(configPaths('./tsconfig.paths.json'))(config);
|
|
|
|
|
|
|
|
return config;
|
|
|
|
};
|