Skip to content

Commit 7bbcbf3

Browse files
committed
React package updates
React Scripts TS, React App Rewired and React App Rewire Less now all removed because they are deprecated or not well maintained. Create React App Configuration Override and Craco Ant Design added in place of the above packages. All other packages updated. Various issues resolved due to package changes: - Import statements updated for CRA - Config re-written for Craco - All linting warning fixed - Antd forms are now generic and the type must be specified when calling Form.create - All Antd Menu items have had the anchor links removed, anchor links with no href are bad for accessibility and the menu item itself allows specifying an onClick event. - Antd now has link type buttons so anywhere an anchor link was used has been changed to use a button. The only place this is not true is the Forgot Password link because this does not seem to be implemented. - Any anchor links with target="_blank" now have rel="noopener noreferrer" too.
1 parent e0d4516 commit 7bbcbf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+13530
-14754
lines changed

reactjs/config-overrides.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

reactjs/craco.config.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
const { when, whenDev, whenProd, whenCI, whenTest, ESLINT_MODES, POSTCSS_MODES } = require('@craco/craco');
2+
const CopyWebpackPlugin = require('copy-webpack-plugin');
3+
const CracoAntDesignPlugin = require('craco-antd');
4+
5+
module.exports = {
6+
plugins: [
7+
{
8+
plugin: CracoAntDesignPlugin,
9+
options: {
10+
customizeTheme: {
11+
'@primary-color': '#1DA57A',
12+
'@link-color': '#1DA57A',
13+
},
14+
},
15+
},
16+
],
17+
webpack: {
18+
alias: {},
19+
plugins: [],
20+
configure: (webpackConfig, { env, paths }) => {
21+
if (!webpackConfig.plugins) {
22+
config.plugins = [];
23+
}
24+
25+
webpackConfig.plugins.push(
26+
process.env.NODE_ENV === 'production'
27+
? new CopyWebpackPlugin([
28+
{
29+
from: 'node_modules/@aspnet/signalr/dist/browser/signalr.min.js',
30+
},
31+
{
32+
from: 'node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js',
33+
},
34+
{
35+
from: 'src/lib/abp.js',
36+
},
37+
])
38+
: new CopyWebpackPlugin([
39+
{
40+
from: 'node_modules/@aspnet/signalr/dist/browser/signalr.min.js',
41+
},
42+
{
43+
from: 'node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js',
44+
},
45+
{
46+
from: 'src/lib/abp.js',
47+
},
48+
])
49+
);
50+
51+
return webpackConfig;
52+
},
53+
},
54+
};

reactjs/images.d.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)