Skip to content

Commit cb17d39

Browse files
committed
Bump react-scripts to v4
- Bump react-scripts to v4 because of some high risk vulnerability reported by npm - Bump rest of the dependencies to latest versions - Resolve issues with dependency bump Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
1 parent 8d23c8f commit cb17d39

File tree

5 files changed

+6880
-5985
lines changed

5 files changed

+6880
-5985
lines changed

config-overrides.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
/* eslint-disable react-hooks/rules-of-hooks */
12
const {
23
override,
34
addWebpackAlias,
4-
useBabelRc,
5-
useEslintRc
5+
useBabelRc
66
} = require('customize-cra')
77

88
const fs = require('fs')
@@ -14,6 +14,7 @@ const SitemapPlugin = require('sitemap-webpack-plugin').default
1414
const md = require('markdown-it')
1515
const fm = require('front-matter')
1616
const parser = require('fast-xml-parser')
17+
const moduleAlias = require('module-alias')
1718
const hero = require('./src/_data/hero')
1819
const parseBlog = require('./src/parse-blog')
1920
const redirectConfig = require('./redirect')
@@ -91,7 +92,7 @@ const addSitePlugins = () => config => {
9192
const { id, date } = parseBlog(fileName)
9293
return {
9394
path: '/blog/show/' + id,
94-
lastMod: date.toISOString().slice(0, 10)
95+
lastmod: date.toISOString().slice(0, 10)
9596
}
9697
})
9798
)
@@ -111,9 +112,9 @@ const addSitePlugins = () => config => {
111112
)
112113

113114
config.plugins.push(
114-
new SitemapPlugin(hero.url, routes, {
115-
lastMod: true,
116-
changeFreq: 'weekly'
115+
new SitemapPlugin({
116+
base: hero.url,
117+
paths: routes
117118
})
118119
)
119120

@@ -156,9 +157,11 @@ const addSitePlugins = () => config => {
156157
return config
157158
}
158159

160+
moduleAlias.addAlias('react', 'preact/compat')
161+
moduleAlias.addAlias('react-dom', 'preact/compat')
162+
159163
module.exports = override(
160164
useBabelRc(),
161-
useEslintRc(),
162165
addWebpackAlias({
163166
react: 'preact/compat',
164167
'react-dom': 'preact/compat'

0 commit comments

Comments
 (0)