Skip to content

Commit faa60cb

Browse files
committed
app: image toolkit
1 parent 0b2fbba commit faa60cb

File tree

6 files changed

+1149
-9
lines changed

6 files changed

+1149
-9
lines changed

craco.config.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,24 @@ module.exports = {
88
},
99
},
1010
},
11-
// webpack: {
12-
// configure: (webpackConfig, { env, paths }) => {
13-
// if (env === 'production') {
14-
// webpackConfig.devtool = false; // Disable sourcemaps
15-
// }
16-
// return webpackConfig;
17-
// },
18-
// },
11+
webpack: {
12+
configure: (webpackConfig, { env, paths }) => {
13+
// Disable sourcemaps for production if needed
14+
// if (env === 'production') {
15+
// webpackConfig.devtool = false;
16+
// }
17+
18+
// Add a rule to ignore source map warnings from node_modules
19+
webpackConfig.module.rules.push({
20+
test: /\.js$/,
21+
enforce: 'pre',
22+
use: ['source-map-loader'],
23+
exclude: /node_modules/,
24+
});
25+
// Temporarily ignore all source map warnings
26+
webpackConfig.ignoreWarnings = [/Failed to parse source map/];
27+
28+
return webpackConfig;
29+
},
30+
},
1931
};

0 commit comments

Comments
 (0)