Skip to content

Commit

Permalink
🐛 use rescripts to instead react-app-rewired (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deturium authored Mar 31, 2020
1 parent bb54d95 commit f3f46f7
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 31 deletions.
3 changes: 2 additions & 1 deletion examples/purehtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"description": "",
"main": "index.html",
"scripts": {
"start": "PORT=7104 http-server . --cors",
"start": "cross-env PORT=7104 http-server . --cors",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "MIT",
"devDependencies": {
"cross-env": "^7.0.2",
"http-server": "^0.12.1"
}
}
1 change: 0 additions & 1 deletion examples/react16/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
SKIP_PREFLIGHT_CHECK=true
BROWSER=none
PORT=7100
WDS_SOCKET_PORT=7100
27 changes: 27 additions & 0 deletions examples/react16/.rescriptsrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const { name } = require('./package');

module.exports = {
webpack: config => {
config.output.library = `${name}-[name]`;
config.output.libraryTarget = 'umd';
config.output.jsonpFunction = `webpackJsonp_${name}`;

return config;
},

devServer: _ => {
const config = {};

config.port = '7100';
config.headers = {
'Access-Control-Allow-Origin': '*',
};
config.historyApiFallback = true;

config.hot = false;
config.watchContentBase = false;
config.liveReload = false;

return config;
},
};
23 changes: 0 additions & 23 deletions examples/react16/config-overrides.js

This file was deleted.

12 changes: 6 additions & 6 deletions examples/react16/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"react-router-dom": "^5.1.2"
},
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject"
"start": "rescripts start",
"build": "rescripts build",
"test": "rescripts test",
"eject": "rescripts eject"
},
"browserslist": {
"production": [
Expand All @@ -27,7 +27,7 @@
]
},
"devDependencies": {
"react-app-rewired": "^2.1.5",
"react-scripts": "^3.4.0"
"@rescripts/cli": "^0.0.14",
"react-scripts": "^3.4.1"
}
}

1 comment on commit f3f46f7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit undefined

https://ant-design-landing-build-k88b25b9r.now.sh

Please sign in to comment.