代码如下:
module.exports = {
webpack: override(
addLessLoader({
lessOptions: {
javascriptEnabled: true,
modifyVars: { '@primary-color': '#1DA57A' },
},
}),
adjustStyleLoaders(({ use: [, , postcss] }) => {
const postcssOptions = postcss.options
postcss.options = { postcssOptions }
})
),
devServer: overrideDevServer((config) => {
return {
...config,
proxy: {
'/api': {
target: process.env.REACT_APP_API_URL,
pathRewrite: {
'/api': '',
},
},
},
}
}, watchAll()),
}