d5486e5b9a
As long as node does not ship with fill-icu this will do the trick making FormattedRelativeTime work on nodejs. Other polyfill like @formatjs/intl-relativetimeformat/polyfill did not work on nodejs and thus giving an error that client did not match server.
23 lines
658 B
JSON
23 lines
658 B
JSON
{
|
|
"name": "with-react-intl",
|
|
"version": "1.0.0",
|
|
"scripts": {
|
|
"dev": "node --icu-data-dir=node_modules/full-icu server.js",
|
|
"build": "next build && node ./scripts/default-lang",
|
|
"start": "NODE_ENV=production node --icu-data-dir=node_modules/full-icu server.js"
|
|
},
|
|
"dependencies": {
|
|
"@formatjs/intl-relativetimeformat": "^2.8.2",
|
|
"@formatjs/intl-utils": "^0.6.1",
|
|
"accepts": "^1.3.7",
|
|
"babel-plugin-react-intl": "^4.1.14",
|
|
"full-icu": "^1.3.0",
|
|
"glob": "^7.1.4",
|
|
"intl": "^1.2.5",
|
|
"next": "latest",
|
|
"react": "^16.9.0",
|
|
"react-dom": "^16.9.0",
|
|
"react-intl": "^3.1.12"
|
|
},
|
|
"license": "ISC"
|
|
}
|