Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const path = require('path')
const { override, useBabelRc, useEslintRc, addWebpackResolve } = require('customize-cra')
const rewireStyledComponents = require('react-app-rewire-styled-components')
const resolve = require('../webpack/resolve')
module.exports = {
webpack: override(
addWebpackResolve(resolve),
// eslint-disable-next-line react-hooks/rules-of-hooks
// useBabelRc(path.resolve(__dirname, '..', '..', '.babelrc')),
// eslint-disable-next-line react-hooks/rules-of-hooks
// useEslintRc(path.resolve(__dirname, '..', '..', '.eslintrc')),
(config, env) => rewireStyledComponents(config, env, {})
),
}
const path = require('path');
const {override, useEslintRc, fixBabelImports, addBabelPresets, addBabelPlugins, addWebpackResolve, addLessLoader, addDecoratorsLegacy} = require('customize-cra');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
module.exports = override(
useEslintRc(),
addLessLoader({
javascriptEnabled: true,
modifyVars: {
'@primary-color': "#4777e8",
'@link-color': '#4777e8',
},
}),
addWebpackResolve({
alias: {'@': path.resolve(__dirname, 'src')}
}),
addBabelPlugins(
"@babel/plugin-syntax-object-rest-spread",
['@babel/plugin-proposal-decorators', {'legacy': true}]
),
addBabelPresets([
'@emotion/babel-preset-css-prop'
]),
fixBabelImports('antd', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,