Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/webpack.dll.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ export default {
},
module: {
rules: [
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
{
test: /\.(woff|woff2|ttf|eot|jpg|jpeg|png|svg)$/i,
use: [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"yargs": "^17.7.2"
},
"dependencies": {
"@formatjs/intl-datetimeformat": "^6.18.2",
"@formatjs/intl-displaynames": "^6.8.13",
"@formatjs/intl-datetimeformat": "^7.1.2",
"@formatjs/intl-displaynames": "^7.1.2",
"@formatjs/intl-listformat": "^8.1.2",
"@formatjs/intl-locale": "^5.1.2",
"@formatjs/intl-numberformat": "^9.1.2",
Expand Down
14 changes: 11 additions & 3 deletions pkg/webui/lib/components/with-locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ const WithLocale = ({ children }) => {
if (!window.Intl.DisplayNames) {
log('Polyfilling Intl.DisplayNames')
await import(
/* webpackChunkName: "locale-display-names" */ '@formatjs/intl-displaynames/polyfill'
/* webpackChunkName: "locale-display-names" */
// eslint-disable-next-line import/extensions -- package exports require explicit .js
'@formatjs/intl-displaynames/polyfill.js'
)
// Instead of using dynamic imports that would cause all possible locales to be bundled
// we only load the ones we want to support which as of now are English and Japanese.
Expand Down Expand Up @@ -167,7 +169,9 @@ const WithLocale = ({ children }) => {
if (!window.Intl.DateTimeFormat) {
log('Polyfilling Intl.DateTimeFormat')
await import(
/* webpackChunkName: "locale-date-time-format" */ '@formatjs/intl-datetimeformat/polyfill'
/* webpackChunkName: "locale-date-time-format" */
// eslint-disable-next-line import/extensions -- package exports require explicit .js
'@formatjs/intl-datetimeformat/polyfill.js'
)
}

Expand Down Expand Up @@ -260,7 +264,11 @@ const LocaleLoader = ({ children }) => {
if (window.Intl.DateTimeFormat.polyfilled) {
log(`Polyfilling DateTimeFormat for language ${language}`)
promises.push(
import(/* webpackChunkName: "locale" */ '@formatjs/intl-datetimeformat/add-all-tz'),
import(
/* webpackChunkName: "locale" */
// eslint-disable-next-line import/extensions -- package exports require explicit .js
'@formatjs/intl-datetimeformat/add-all-tz.js'
),
)
switch (language) {
case 'ja':
Expand Down
24 changes: 12 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1818,23 +1818,23 @@
"@formatjs/ecma402-abstract" "2.3.6"
tslib "^2.8.0"

"@formatjs/intl-datetimeformat@^6.18.2":
version "6.18.2"
resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-6.18.2.tgz#46c27cedb9af0e719c209cc94f7347182645b2e8"
integrity sha512-XXGJVOi/vmB+eLtYDs+ggDIvba/+VNmNrDZOtMyol5D0zl+zzuPps6W3TgDflpKfzg4memAEbLnA1wC6/TBSjQ==
"@formatjs/intl-datetimeformat@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-7.1.2.tgz#95795c940d67f113089f813b09e49080bd1cf02f"
integrity sha512-fkZcxkfQExGR1QPemva1YO15UnLiPJBTOdil1lnNA2dgZLCxL3mWSMcwJi5/s8qLmi4mO2JPfW7v41h1lKUtQQ==
dependencies:
"@formatjs/ecma402-abstract" "2.3.6"
"@formatjs/intl-localematcher" "0.6.2"
"@formatjs/ecma402-abstract" "3.0.8"
"@formatjs/intl-localematcher" "0.7.5"
decimal.js "^10.4.3"
tslib "^2.8.0"

"@formatjs/intl-displaynames@^6.8.13":
version "6.8.13"
resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.8.13.tgz#5e85980b40fbaa0b81e504608e33db6e16a3891e"
integrity sha512-VbY7BdYJX5eURVKLk2grndUQtnbCLNbcJId/Sb/PsX7fWXiqWvg7qt/mecVHRzqoSEoGCQToKDxzpJj8RC0s3g==
"@formatjs/intl-displaynames@^7.1.2":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-7.1.2.tgz#44047b4538c57a00bfa0270931d5ddc5b9c179d6"
integrity sha512-iuKrkUHWXm+9zHU/MQXuq+6mdbj+vhrDsApSgNKbEC68Yu00fw6vtMHAOK6n253s7K5aIppaHKQulESSOe1qUw==
dependencies:
"@formatjs/ecma402-abstract" "2.3.6"
"@formatjs/intl-localematcher" "0.6.2"
"@formatjs/ecma402-abstract" "3.0.8"
"@formatjs/intl-localematcher" "0.7.5"
tslib "^2.8.0"

"@formatjs/intl-enumerator@2.1.2":
Expand Down
Loading