Skip to content

Commit

Permalink
fix demo app
Browse files Browse the repository at this point in the history
setting GENERATE_SOURCEMAP=false due to facebook/create-react-app#11752

also using react-app-rewired due to facebook/create-react-app#12021 and solana-labs/oyster#538
  • Loading branch information
arielsegura committed Oct 5, 2022
1 parent 0e77a9c commit fa8a332
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
16 changes: 16 additions & 0 deletions packages/react-app-example-daos/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// config-overrides.js
module.exports = {
webpack: function (config, env) {
config.module.rules = config.module.rules.map((rule) => {
if (rule.oneOf instanceof Array) {
rule.oneOf[rule.oneOf.length - 1].exclude = [
/\.(js|mjs|jsx|cjs|ts|tsx)$/,
/\.html$/,
/\.json$/,
];
}
return rule;
});
return config;
},
};
10 changes: 6 additions & 4 deletions packages/react-app-example-daos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"start": "GENERATE_SOURCEMAP=false react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test"
},
"eslintConfig": {
"extends": [
Expand All @@ -48,5 +47,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"react-app-rewired": "^2.2.1"
}
}
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12038,6 +12038,13 @@ react-app-polyfill@^3.0.0:
regenerator-runtime "^0.13.9"
whatwg-fetch "^3.6.2"

react-app-rewired@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/react-app-rewired/-/react-app-rewired-2.2.1.tgz#84901ee1e3f26add0377ebec0b41bcdfce9fc211"
integrity sha512-uFQWTErXeLDrMzOJHKp0h8P1z0LV9HzPGsJ6adOtGlA/B9WfT6Shh4j2tLTTGlXOfiVx6w6iWpp7SOC5pvk+gA==
dependencies:
semver "^5.6.0"

react-dev-utils@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-12.0.1.tgz#ba92edb4a1f379bd46ccd6bcd4e7bc398df33e73"
Expand Down

0 comments on commit fa8a332

Please sign in to comment.