diff --git a/services/web/.storybook/preview.tsx b/services/web/.storybook/preview.tsx index e998af1647..0ed624e087 100644 --- a/services/web/.storybook/preview.tsx +++ b/services/web/.storybook/preview.tsx @@ -1,7 +1,7 @@ import type { Preview } from '@storybook/react' // Storybook does not (currently) support async loading of "stories". Therefore -// the strategy in frontend/js/i18n.js does not work (because we cannot wait on +// the strategy in frontend/js/i18n.ts does not work (because we cannot wait on // the promise to resolve). // Therefore we have to use the synchronous method for configuring // react-i18next. Because this, we can only hard-code a single language. diff --git a/services/web/cypress/support/component.ts b/services/web/cypress/support/component.ts index 8fd40b0d99..f658b7d2e9 100644 --- a/services/web/cypress/support/component.ts +++ b/services/web/cypress/support/component.ts @@ -1,6 +1,6 @@ import 'cypress-plugin-tab' import { resetMeta } from './ct/window' // needs to be before i18n -import '../../frontend/js/i18n' +import '@/i18n' import './shared/commands' import './shared/exceptions' import './ct/commands' diff --git a/services/web/frontend/js/dev-toolbar.js b/services/web/frontend/js/dev-toolbar.ts similarity index 100% rename from services/web/frontend/js/dev-toolbar.js rename to services/web/frontend/js/dev-toolbar.ts diff --git a/services/web/frontend/js/i18n.js b/services/web/frontend/js/i18n.ts similarity index 100% rename from services/web/frontend/js/i18n.js rename to services/web/frontend/js/i18n.ts diff --git a/services/web/frontend/js/ide-detached.js b/services/web/frontend/js/ide-detached.ts similarity index 100% rename from services/web/frontend/js/ide-detached.js rename to services/web/frontend/js/ide-detached.ts diff --git a/services/web/frontend/js/marketing.js b/services/web/frontend/js/marketing.ts similarity index 100% rename from services/web/frontend/js/marketing.js rename to services/web/frontend/js/marketing.ts diff --git a/services/web/frontend/js/pages/project-list.tsx b/services/web/frontend/js/pages/project-list.tsx index 3886db545e..60fcda413c 100644 --- a/services/web/frontend/js/pages/project-list.tsx +++ b/services/web/frontend/js/pages/project-list.tsx @@ -1,7 +1,7 @@ import './../utils/meta' import './../utils/webpack-public-path' import './../infrastructure/error-reporter' -import './../i18n' +import '@/i18n' import '../features/event-tracking' import '../features/cookie-banner' import '../features/link-helpers/slow-link' diff --git a/services/web/frontend/js/pages/sharing-updates.tsx b/services/web/frontend/js/pages/sharing-updates.tsx index d75069129e..429bc8f57c 100644 --- a/services/web/frontend/js/pages/sharing-updates.tsx +++ b/services/web/frontend/js/pages/sharing-updates.tsx @@ -1,7 +1,7 @@ import './../utils/meta' import './../utils/webpack-public-path' import './../infrastructure/error-reporter' -import './../i18n' +import '@/i18n' import ReactDOM from 'react-dom' import SharingUpdatesRoot from '../features/token-access/components/sharing-updates-root' diff --git a/services/web/frontend/js/pages/token-access.tsx b/services/web/frontend/js/pages/token-access.tsx index 0ce94520ae..f18cd1e541 100644 --- a/services/web/frontend/js/pages/token-access.tsx +++ b/services/web/frontend/js/pages/token-access.tsx @@ -1,7 +1,7 @@ import './../utils/meta' import './../utils/webpack-public-path' import './../infrastructure/error-reporter' -import './../i18n' +import '@/i18n' import ReactDOM from 'react-dom' import TokenAccessRoot from '../features/token-access/components/token-access-root' diff --git a/services/web/frontend/js/pages/user/settings.jsx b/services/web/frontend/js/pages/user/settings.jsx index 15c1c21eb7..b31d1c4d5c 100644 --- a/services/web/frontend/js/pages/user/settings.jsx +++ b/services/web/frontend/js/pages/user/settings.jsx @@ -2,7 +2,7 @@ import '../../marketing' import './../../utils/meta' import './../../utils/webpack-public-path' import './../../infrastructure/error-reporter' -import './../../i18n' +import '@/i18n' import '../../features/settings/components/root' import ReactDOM from 'react-dom' import SettingsPageRoot from '../../features/settings/components/root.tsx' diff --git a/services/web/frontend/js/pages/user/subscription/base.js b/services/web/frontend/js/pages/user/subscription/base.js index fb28e97f95..7773ac9bb2 100644 --- a/services/web/frontend/js/pages/user/subscription/base.js +++ b/services/web/frontend/js/pages/user/subscription/base.js @@ -1,7 +1,7 @@ import './../../../utils/meta' import './../../../utils/webpack-public-path' import './../../../infrastructure/error-reporter' -import './../../../i18n' +import '@/i18n' import '../../../features/event-tracking' import '../../../features/cookie-banner' import '../../../features/link-helpers/slow-link' diff --git a/services/web/frontend/js/shared/hooks/use-wait-for-i18n.ts b/services/web/frontend/js/shared/hooks/use-wait-for-i18n.ts index b81b5ce363..ffed558373 100644 --- a/services/web/frontend/js/shared/hooks/use-wait-for-i18n.ts +++ b/services/web/frontend/js/shared/hooks/use-wait-for-i18n.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import i18n from '../../../js/i18n' +import i18n from '@/i18n' import { useTranslation } from 'react-i18next' function useWaitForI18n() { diff --git a/services/web/modules/launchpad/frontend/js/pages/launchpad.js b/services/web/modules/launchpad/frontend/js/pages/launchpad.js index 861b49d9fb..0c6b0b8cac 100644 --- a/services/web/modules/launchpad/frontend/js/pages/launchpad.js +++ b/services/web/modules/launchpad/frontend/js/pages/launchpad.js @@ -1,5 +1,5 @@ /* global io */ -import '../../../../../frontend/js/marketing' +import '@/marketing' import { inflightHelper, toggleDisplay, diff --git a/services/web/modules/user-activate/frontend/js/pages/user-activate-page.jsx b/services/web/modules/user-activate/frontend/js/pages/user-activate-page.jsx index b7d9a69959..22174de921 100644 --- a/services/web/modules/user-activate/frontend/js/pages/user-activate-page.jsx +++ b/services/web/modules/user-activate/frontend/js/pages/user-activate-page.jsx @@ -1,4 +1,4 @@ -import '../../../../../frontend/js/marketing' +import '@/marketing' import ReactDOM from 'react-dom' import UserActivateRegister from '../components/user-activate-register' diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index 4047bbbc6c..9f82eec062 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -19,9 +19,9 @@ const entryPoints = { tracing: './frontend/js/tracing.js', 'bootstrap-3': './frontend/js/bootstrap-3.ts', 'bootstrap-5': './frontend/js/bootstrap-5.ts', - devToolbar: './frontend/js/dev-toolbar.js', - 'ide-detached': './frontend/js/ide-detached.js', - marketing: './frontend/js/marketing.js', + devToolbar: './frontend/js/dev-toolbar.ts', + 'ide-detached': './frontend/js/ide-detached.ts', + marketing: './frontend/js/marketing.ts', 'main-style': './frontend/stylesheets/main-style.less', 'main-ieee-style': './frontend/stylesheets/main-ieee-style.less', 'main-light-style': './frontend/stylesheets/main-light-style.less',