Skip to content

Commit 602bbcf

Browse files
Upgrade Next.js and remove OpenSSL workaround
1 parent b30dc99 commit 602bbcf

File tree

7 files changed

+210
-2582
lines changed

7 files changed

+210
-2582
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ jobs:
3030
# Build job
3131
build:
3232
runs-on: ubuntu-latest
33-
env:
34-
NODE_OPTIONS: --openssl-legacy-provider
3533
steps:
3634
- name: Checkout
3735
uses: actions/checkout@v4

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ http://localhost:3000
205205

206206
GitHub Pages deployment is handled by the GitHub Actions workflow in `.github/workflows/build-and-deploy.yml`, which runs `yarn install --frozen-lockfile` and `yarn build` on pushes to `master`.
207207

208-
The current Next.js/Webpack stack still requires the `--openssl-legacy-provider` flag on Node 22, and that compatibility flag is already included in the repo scripts.
209-
210208
## Translations
211209

212210
### Folder structure

components/TGAdmins.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import {
44
faTwitter,
55
} from '@fortawesome/fontawesome-free-brands';
66

7-
import { tgadmins } from '../lists/tgadmins.json'
7+
import tgAdminsData from '../lists/tgadmins.json';
88

99
const hasAnySocialContact = (telegramAdmin) => telegramAdmin.twitter || telegramAdmin.telegram
1010
const getSocialClassNames = (social) => Boolean(social) ? 'icon iconlink' : 'icon iconlink hidden'
1111

1212
const TGAdmins = () => {
13-
const telegramAdmins = tgadmins.map(telegramAdmin => (
13+
const telegramAdmins = tgAdminsData.tgadmins.map((telegramAdmin) => (
1414
<div className="col-xs-12 col-md-3">
1515
<div className="team--member tg--admins pb-xs">
1616
<div className="flexIt">
@@ -44,6 +44,6 @@ const TGAdmins = () => {
4444
{telegramAdmins}
4545
</div>
4646
);
47-
}
47+
};
4848

4949
export default TGAdmins;

lists/mentions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
"date": "2018-04-17"
205205
},
206206
{
207-
"url": "https://cryptovest.com/news/verge-xvg-mystery-partner-officially-revealed-almost-broke-the-internet//",
207+
"url": "https://cryptovest.com/news/verge-xvg-mystery-partner-officially-revealed-almost-broke-the-internet/",
208208
"img": "../static/img/mentioned-in/Cryptovest.png",
209209
"width": "100",
210210
"title": "Verge (XVG) Mystery Partner Officially Revealed! Almost Broke the Internet",

next.config.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
const webpack = require('webpack');
2-
31
module.exports = {
2+
eslint: {
3+
ignoreDuringBuilds: true,
4+
},
5+
46
exportPathMap(defaultPathMap) {
57
const exportMap = { ...defaultPathMap };
68

@@ -14,9 +16,12 @@ module.exports = {
1416
};
1517
},
1618

17-
webpack: (config, { dev }) => {
19+
webpack: (config, { dev, webpack }) => {
1820
if (!dev) {
19-
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
21+
config.plugins.push(new webpack.IgnorePlugin({
22+
resourceRegExp: /^\.\/locale$/,
23+
contextRegExp: /moment$/,
24+
}));
2025
}
2126
config.module.rules.push({
2227
test: /locales/,
@@ -27,7 +32,10 @@ module.exports = {
2732
},
2833
});
2934
if (dev) {
30-
config.plugins.push(new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/));
35+
config.plugins.push(new webpack.IgnorePlugin({
36+
resourceRegExp: /^\.\/locale$/,
37+
contextRegExp: /moment$/,
38+
}));
3139
}
3240

3341
return config;

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "yarn build && ./node_modules/.bin/sass-lint styles",
8-
"dev": "NODE_OPTIONS=--openssl-legacy-provider node server.js",
9-
"build": "NODE_OPTIONS=--openssl-legacy-provider next build && NODE_OPTIONS=--openssl-legacy-provider next export -o docs && echo 'vergecurrency.com' > docs/CNAME && echo '' > docs/.nojekyll && cp -r static-pages/paper-wallet docs && cp -r static-pages/seedphrase docs",
10-
"prestart": "NODE_OPTIONS=--openssl-legacy-provider next build",
11-
"start": "NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider node server.js",
8+
"dev": "node server.js",
9+
"build": "next build && next export -o docs && echo 'vergecurrency.com' > docs/CNAME && echo '' > docs/.nojekyll && cp -r static-pages/paper-wallet docs && cp -r static-pages/seedphrase docs",
10+
"prestart": "next build",
11+
"start": "NODE_ENV=production node server.js",
1212
"lint": "./node_modules/.bin/eslint . --fix",
1313
"updateLanguages": "node locales/updateLanguages.js",
1414
"predeploy": "yarn updateLanguages && yarn build",
@@ -56,16 +56,16 @@
5656
"markdown-in-js": "^1.1.3",
5757
"moment": "^2.29.4",
5858
"moment-timezone": "0.6.0",
59-
"next": "9.5.5",
59+
"next": "12.3.4",
6060
"normalize.css": "^8.0.1",
6161
"npm-update-all": "^1.0.1",
6262
"nprogress": "^0.2.0",
6363
"platform": "^1.3.5",
6464
"postcss-easy-import": "^4.0.0",
6565
"prop-types": "^15.7.2",
66-
"react": "16.14.0",
66+
"react": "17.0.2",
6767
"react-burger-menu": "^3.1.0",
68-
"react-dom": "16.14.0",
68+
"react-dom": "17.0.2",
6969
"react-expand-collapse": "^0.2.0",
7070
"react-i18next": "^7.3.4",
7171
"react-lazyload": "^3.2.1",

0 commit comments

Comments
 (0)