Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { override, fixBabelImports, addLessLoader,addPostcssPlugins } = require('customize-cra');
module.exports = override(
fixBabelImports('import', {
libraryName: 'antd-mobile',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: { '@btn-primary-bg': '#f00' },
}),
addPostcssPlugins([require('postcss-pxtorem')({
rootValue: 75,
propList: ['*'],
// propList: ['*', '!border*', '!font-size*', '!letter-spacing'],
// propWhiteList: []
selectorBlackList: [
'am'
]
}),])
);
/* eslint-disable global-require */
const { override, addPostcssPlugins, disableEsLint } = require('customize-cra');
module.exports = override(
disableEsLint(),
addPostcssPlugins([
require('postcss-preset-env')({
stage: 0,
features: {
'custom-media-queries': {
importFrom: [
{
customMedia: {
'--phonePortrait': '(width <= 414px)',
'--phoneLandscape':
'(width >= 415px) and (width <= 667px)',
'--tabletPortrait':
'(width >= 668px) and (width <= 768px)',
'--tabletLandscape':
'(width >= 769px) and (width <= 1024px)',
'--desktopS':
'(width >= 1025px) and (width <= 1366px)',