Skip to content

Commit 99c31f8

Browse files
authored
Merge pull request #2704 from daostack/CW-source-map-enable
Source map enable
2 parents 480e860 + cb47b3b commit 99c31f8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

craco.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
const CracoAlias = require("craco-alias");
22

33
module.exports = {
4+
webpack: {
5+
configure: (webpackConfig, { env, paths }) => {
6+
const reactAppEnv = process.env.REACT_APP_ENV;
7+
if (reactAppEnv === "dev" || reactAppEnv === "stage") {
8+
webpackConfig.devtool = "source-map";
9+
} else {
10+
webpackConfig.devtool = false;
11+
}
12+
return webpackConfig;
13+
},
14+
},
415
style: {
516
css: {
617
loaderOptions: () => ({

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"sourceMap": true,
34
"target": "es5",
45
"lib": ["dom", "dom.iterable", "esnext"],
56
"allowJs": true,

0 commit comments

Comments
 (0)