项目配置 @craco/craco ,可参考博客
craco.config.js添加如下配置
// 顶部引入path
const path = require("path");
module.exports = {
...
webpack: {
configure: (webpackConfig) => {
webpackConfig.devtool = webpackConfig.mode === "production" ? false : 'inline-source-map';
return webpackConfig
}
}
...
}