diff --git a/dirAlias.js b/dirAlias.js index 41f85809413..6c4ab7be1e2 100644 --- a/dirAlias.js +++ b/dirAlias.js @@ -8,6 +8,8 @@ const resolvePath = relativePath => path.resolve(appDirectory, relativePath); module.exports = { webpackDirAlias: { '#app': resolvePath('src/app'), + '#src': resolvePath('src'), + '#nextjs': resolvePath('ws-nextjs-app/'), '#contexts': resolvePath('src/app/contexts'), '#components': resolvePath('src/app/legacy/components'), '#containers': resolvePath('src/app/legacy/containers'), @@ -23,6 +25,8 @@ module.exports = { }, jestDirAlias: { '^#app(.*)$': '/src/app$1', + '^#src(.*)$': '/src$1', + '^#nextjs(.*)$': '/ws-nextjs-app$1', '^#contexts(.*)$': '/src/app/contexts$1', '^#components(.*)$': '/src/app/legacy/components$1', '^#containers(.*)$': '/src/app/legacy/containers$1', @@ -39,6 +43,8 @@ module.exports = { eslintDirAlias: { map: [ ['#app', './src/app'], + ['#src', './src'], + ['#nextjs', './ws-nextjs-app'], ['#contexts', './src/app/contexts'], ['#components', './src/app/legacy/components'], ['#containers', './src/app/legacy/containers'], diff --git a/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.test.ts b/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.test.ts index 2a0b1c0b6c7..4f42247af44 100644 --- a/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.test.ts +++ b/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.test.ts @@ -1,4 +1,4 @@ -import { Post } from '../../../../../ws-nextjs-app/pages/[service]/live/[id]/Post/types'; +import { Post } from '#nextjs/pages/[service]/live/[id]/Post/types'; import { samplePost, twitterSamplePost, videoSamplePost } from './fixtures'; import getLiveBlogPostingSchema from '.'; diff --git a/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts b/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts index 800f1ce7ea9..3c2ffc6f4e1 100644 --- a/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts +++ b/src/app/lib/seoUtils/getLiveBlogPostingSchema/index.ts @@ -1,6 +1,6 @@ import buildIChefURL from '#app/lib/utilities/ichefURL'; import { OptimoBlock } from '#app/models/types/optimo'; -import { Post } from '../../../../../ws-nextjs-app/pages/[service]/live/[id]/Post/types'; +import { Post } from '#nextjs/pages/[service]/live/[id]/Post/types'; export default ({ posts, diff --git a/src/app/lib/utilities/getBrandedImage/index.js b/src/app/lib/utilities/getBrandedImage/index.js index 9bf0838c033..959aa7a6345 100644 --- a/src/app/lib/utilities/getBrandedImage/index.js +++ b/src/app/lib/utilities/getBrandedImage/index.js @@ -1,4 +1,4 @@ -import { getEnvConfig } from '../getEnvConfig'; +import { getEnvConfig } from '#app/lib/utilities/getEnvConfig'; const getBrandedImage = (locator, service) => `${ diff --git a/src/app/routes/article/getInitialData/index.test.ts b/src/app/routes/article/getInitialData/index.test.ts index de93106ac76..0b1f915c0d0 100644 --- a/src/app/routes/article/getInitialData/index.test.ts +++ b/src/app/routes/article/getInitialData/index.test.ts @@ -1,11 +1,12 @@ import { Agent } from 'undici'; -import * as getOnwardsPageData from '../utils/getOnwardsData'; -import * as fetchPageData from '../../utils/fetchPageData'; -import nodeLogger from '../../../../testHelpers/loggerMock'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; +import * as getOnwardsPageData from '#app/routes/article/utils/getOnwardsData'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import pidginArticleWithLatestMedia from '#data/pidgin/articles/cw0x29n2pvqo.json'; +import { ARTICLE_PAGE } from '#app/routes/utils/pageTypes'; +import nodeLogger from '#src/testHelpers/loggerMock'; + import getInitialData from '.'; -import pidginArticleWithLatestMedia from '../../../../../data/pidgin/articles/cw0x29n2pvqo.json'; -import { ARTICLE_PAGE } from '../../utils/pageTypes'; process.env.BFF_PATH = 'https://mock-bff-path'; diff --git a/src/app/routes/article/getInitialData/index.ts b/src/app/routes/article/getInitialData/index.ts index 5c50e8f846a..c0a1ae5c83a 100644 --- a/src/app/routes/article/getInitialData/index.ts +++ b/src/app/routes/article/getInitialData/index.ts @@ -1,15 +1,18 @@ import pipe from 'ramda/src/pipe'; -import nodeLogger from '../../../lib/logger.node'; -import { Services, Toggles, Variants } from '../../../models/types/global'; -import getOnwardsPageData from '../utils/getOnwardsData'; -import addAnalyticsCounterName from '../utils/addAnalyticsCounterName'; -import augmentWithDisclaimer from '../utils/augmentWithDisclaimer'; -import { advertisingAllowed, isSfv } from '../utils/paramChecks'; -import { FetchError, GetAgent } from '../../../models/types/fetch'; -import handleError from '../../utils/handleError'; -import fetchDataFromBFF from '../../utils/fetchDataFromBFF'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import certsRequired from '../../utils/certsRequired'; +import nodeLogger from '#lib/logger.node'; +import { Services, Toggles, Variants } from '#models/types/global'; +import getOnwardsPageData from '#app/routes/article/utils/getOnwardsData'; +import addAnalyticsCounterName from '#app/routes/article/utils/addAnalyticsCounterName'; +import augmentWithDisclaimer from '#app/routes/article/utils/augmentWithDisclaimer'; +import { + advertisingAllowed, + isSfv, +} from '#app/routes/article/utils/paramChecks'; +import { FetchError, GetAgent } from '#models/types/fetch'; +import handleError from '#app/routes/utils/handleError'; +import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import certsRequired from '#app/routes/utils/certsRequired'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/article/index.tsx b/src/app/routes/article/index.tsx index ec592482aad..01872bd97e4 100644 --- a/src/app/routes/article/index.tsx +++ b/src/app/routes/article/index.tsx @@ -21,7 +21,7 @@ import { FEATURE_INDEX_PAGE, } from '#app/routes/utils/pageTypes'; import { Article } from '#app/models/types/optimo'; -import getInitialData from './getInitialData'; +import getInitialData from '#app/routes/article/getInitialData'; type SupportedPageTypes = | typeof ARTICLE_PAGE diff --git a/src/app/routes/article/utils/getOnwardsData.test.ts b/src/app/routes/article/utils/getOnwardsData.test.ts index 96c6ed8d562..18e1de091fb 100644 --- a/src/app/routes/article/utils/getOnwardsData.test.ts +++ b/src/app/routes/article/utils/getOnwardsData.test.ts @@ -1,8 +1,8 @@ import { Agent } from 'undici'; import recommendationsJson from '#data/mundo/recommendations/index.json'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; import hasArticleRecommendations from './hasArticleRecommendations'; import getOnwardsPageData from './getOnwardsData'; -import * as fetchPageData from '../../utils/fetchPageData'; jest.mock('./hasArticleRecommendations', () => jest.fn()); diff --git a/src/app/routes/article/utils/getOnwardsData.ts b/src/app/routes/article/utils/getOnwardsData.ts index 93d1ca5f332..c56dc4b5300 100644 --- a/src/app/routes/article/utils/getOnwardsData.ts +++ b/src/app/routes/article/utils/getOnwardsData.ts @@ -5,8 +5,8 @@ import isEmpty from 'ramda/src/isEmpty'; import { DATA_FETCH_ERROR } from '#lib/logger.const'; import getRecommendationsUrl from '#app/lib/utilities/getUrlHelpers/getRecommendationsUrl'; import { SECONDARY_DATA_TIMEOUT } from '#app/lib/utilities/getFetchTimeouts'; -import fetchPageData from '../../utils/fetchPageData'; -import nodeLogger from '../../../lib/logger.node'; +import fetchPageData from '#app/routes/utils/fetchPageData'; +import nodeLogger from '#app/lib/logger.node'; import hasArticleRecommendations from './hasArticleRecommendations'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/frontPage/getInitialData/index.js b/src/app/routes/frontPage/getInitialData/index.js index 8ac0c08d5ac..fe0fa38587d 100644 --- a/src/app/routes/frontPage/getInitialData/index.js +++ b/src/app/routes/frontPage/getInitialData/index.js @@ -8,10 +8,10 @@ import addIdsToGroups from '#app/routes/utils/sharedDataTransformers/addIdsToGro import filterGroupsWithoutStraplines from '#app/routes/utils/sharedDataTransformers/filterGroupsWithoutStraplines'; import handleError from '#app/routes/utils/handleError'; import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; -import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode'; -import { CPS_ASSET } from '../../utils/pageTypes'; -import nodeLogger from '../../../lib/logger.node'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import { CPS_ASSET } from '#app/routes/utils/pageTypes'; +import nodeLogger from '#app/lib/logger.node'; +import { BFF_FETCH_ERROR } from '#app/lib/logger.const'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/frontPage/getInitialData/index.test.js b/src/app/routes/frontPage/getInitialData/index.test.js index 6a81bb6d406..e420254d22d 100644 --- a/src/app/routes/frontPage/getInitialData/index.test.js +++ b/src/app/routes/frontPage/getInitialData/index.test.js @@ -1,9 +1,9 @@ import frontPageJsonSerbian from '#data/serbian/frontpage/lat.json'; import radioScheduleJson from '#data/hausa/bbc_hausa_radio/schedule.json'; -import { CPS_ASSET as pageType } from '../../utils/pageTypes'; -import * as fetchPageData from '../../utils/fetchPageData'; -import nodeLogger from '../../../../testHelpers/loggerMock'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; +import { CPS_ASSET as pageType } from '#app/routes/utils/pageTypes'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import { BFF_FETCH_ERROR } from '#app/lib/logger.const'; +import nodeLogger from '#src/testHelpers/loggerMock'; import getInitialData from '.'; jest.mock('#app/lib/utilities/onClient', () => diff --git a/src/app/routes/homePage/getInitialData/index.test.ts b/src/app/routes/homePage/getInitialData/index.test.ts index 347dfb1e894..afbfe64652e 100644 --- a/src/app/routes/homePage/getInitialData/index.test.ts +++ b/src/app/routes/homePage/getInitialData/index.test.ts @@ -1,8 +1,8 @@ import { Agent } from 'undici'; import KyrgyzHomeFixture from '#data/kyrgyz/homePage/index.json'; -import * as fetchPageData from '../../utils/fetchPageData'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import { HOME_PAGE } from '#app/routes/utils/pageTypes'; import getInitialData from '.'; -import { HOME_PAGE } from '../../utils/pageTypes'; process.env.BFF_PATH = 'https://mock-bff-path'; diff --git a/src/app/routes/homePage/getInitialData/index.ts b/src/app/routes/homePage/getInitialData/index.ts index 6da43a2d6ed..00ff6da38c0 100644 --- a/src/app/routes/homePage/getInitialData/index.ts +++ b/src/app/routes/homePage/getInitialData/index.ts @@ -1,9 +1,9 @@ import { InitialDataProps } from '#app/models/types/initialData'; -import nodeLogger from '../../../lib/logger.node'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import { FetchError } from '../../../models/types/fetch'; -import fetchDataFromBFF from '../../utils/fetchDataFromBFF'; -import { HOME_PAGE } from '../../utils/pageTypes'; +import nodeLogger from '#app/lib/logger.node'; +import { BFF_FETCH_ERROR } from '#app/lib/logger.const'; +import { FetchError } from '#app/models/types/fetch'; +import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; +import { HOME_PAGE } from '#app/routes/utils/pageTypes'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/index.test.jsx b/src/app/routes/index.test.jsx index bdc0b98b5f0..4e33fc1fe8d 100644 --- a/src/app/routes/index.test.jsx +++ b/src/app/routes/index.test.jsx @@ -19,15 +19,16 @@ import sportArticlePageJson from '#data/sport/judo/articles/cj80n66ddnko.json'; import mediaAssetPageJson from '#data/yoruba/cpsAssets/media-23256797.json'; import { ERROR_PAGE, FRONT_PAGE } from '#app/routes/utils/pageTypes'; +import * as fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; import gahuzaOnDemandAudio from '#data/gahuza/bbc_gahuza_radio/p02pcb5c.json'; +// eslint-disable-next-line import/order import routes from '.'; import { act, render, screen, -} from '../components/react-testing-library-with-providers'; -import { suppressPropWarnings } from '../legacy/psammead/psammead-test-helpers/src'; -import * as fetchDataFromBFF from './utils/fetchDataFromBFF'; +} from '#app/components/react-testing-library-with-providers'; +import { suppressPropWarnings } from '#psammead/psammead-test-helpers/src'; global.performance.getEntriesByName = jest.fn(() => []); diff --git a/src/app/routes/liveRadio/getInitialData/index.js b/src/app/routes/liveRadio/getInitialData/index.js index 4987f7f4730..afb8bd681d0 100644 --- a/src/app/routes/liveRadio/getInitialData/index.js +++ b/src/app/routes/liveRadio/getInitialData/index.js @@ -1,9 +1,9 @@ import path from 'ramda/src/path'; -import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode'; -import { LIVE_RADIO_PAGE } from '../../utils/pageTypes'; -import fetchDataFromBFF from '../../utils/fetchDataFromBFF'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import nodeLogger from '../../../lib/logger.node'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import { LIVE_RADIO_PAGE } from '#app/routes/utils/pageTypes'; +import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import nodeLogger from '#lib/logger.node'; const logger = nodeLogger(__filename); const getScheduleToggle = path(['liveRadioSchedule', 'enabled']); diff --git a/src/app/routes/liveRadio/getInitialData/index.test.js b/src/app/routes/liveRadio/getInitialData/index.test.js index 5b34c565050..041bb5a1bb5 100644 --- a/src/app/routes/liveRadio/getInitialData/index.test.js +++ b/src/app/routes/liveRadio/getInitialData/index.test.js @@ -1,7 +1,7 @@ import liveRadioJson from '#data/korean/bbc_korean_radio/liveradio.json'; import { LIVE_RADIO_PAGE } from '#app/routes/utils/pageTypes'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; import getInitialData from '.'; -import * as fetchPageData from '../../utils/fetchPageData'; fetch.mockResponse(JSON.stringify(liveRadioJson)); diff --git a/src/app/routes/mostRead/getInitialData/index.js b/src/app/routes/mostRead/getInitialData/index.js index 9312899f3ec..996ec030bc8 100644 --- a/src/app/routes/mostRead/getInitialData/index.js +++ b/src/app/routes/mostRead/getInitialData/index.js @@ -1,9 +1,9 @@ -import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode'; -import { MOST_READ_PAGE } from '../../utils/pageTypes'; -import handleError from '../../utils/handleError'; -import fetchDataFromBFF from '../../utils/fetchDataFromBFF'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import nodeLogger from '../../../lib/logger.node'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import { MOST_READ_PAGE } from '#app/routes/utils/pageTypes'; +import handleError from '#app/routes/utils/handleError'; +import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import nodeLogger from '#lib/logger.node'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/mostRead/getInitialData/index.test.js b/src/app/routes/mostRead/getInitialData/index.test.js index 2be8c481963..741ab9f4708 100644 --- a/src/app/routes/mostRead/getInitialData/index.test.js +++ b/src/app/routes/mostRead/getInitialData/index.test.js @@ -1,6 +1,6 @@ import { MOST_READ_PAGE } from '#app/routes/utils/pageTypes'; -import * as fetchPageData from '../../utils/fetchPageData'; -import mostReadJson from '../../../../../data/pidgin/mostRead/index.json'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import mostReadJson from '#data/pidgin/mostRead/index.json'; import getInitialData from '.'; process.env.BFF_PATH = 'https://mock-bff-path'; diff --git a/src/app/routes/onDemandAudio/getInitialData/index.ts b/src/app/routes/onDemandAudio/getInitialData/index.ts index 56728e684c9..b953b2f85b8 100644 --- a/src/app/routes/onDemandAudio/getInitialData/index.ts +++ b/src/app/routes/onDemandAudio/getInitialData/index.ts @@ -5,9 +5,9 @@ import { InitialDataProps } from '#app/models/types/initialData'; import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; import overrideRendererOnTest from '#app/routes/utils/overrideRendererOnTest'; import isTest from '#app/lib/utilities/isTest'; -import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode'; -import { getPodcastExternalLinks } from '../tempData/podcastExternalLinks'; -import nodeLogger from '../../../lib/logger.node'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import { getPodcastExternalLinks } from '#app/routes/onDemandAudio/tempData/podcastExternalLinks'; +import nodeLogger from '#lib/logger.node'; const logger = nodeLogger(__filename); const getScheduleToggle = path(['onDemandRadioSchedule', 'enabled']); diff --git a/src/app/routes/topic/getInitialData/index.js b/src/app/routes/topic/getInitialData/index.js index f074910326b..8a929646632 100644 --- a/src/app/routes/topic/getInitialData/index.js +++ b/src/app/routes/topic/getInitialData/index.js @@ -1,10 +1,10 @@ import Url from 'url-parse'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import nodeLogger from '../../../lib/logger.node'; -import getErrorStatusCode from '../../utils/fetchPageData/utils/getErrorStatusCode'; -import fetchDataFromBFF from '../../utils/fetchDataFromBFF'; -import { TOPIC_PAGE } from '../../utils/pageTypes'; -import isTest from '../../../lib/utilities/isTest'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import nodeLogger from '#lib/logger.node'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import fetchDataFromBFF from '#app/routes/utils/fetchDataFromBFF'; +import { TOPIC_PAGE } from '#app/routes/utils/pageTypes'; +import isTest from '#lib/utilities/isTest'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/topic/getInitialData/index.test.js b/src/app/routes/topic/getInitialData/index.test.js index b203dc448d6..36d6c891613 100644 --- a/src/app/routes/topic/getInitialData/index.test.js +++ b/src/app/routes/topic/getInitialData/index.test.js @@ -1,7 +1,7 @@ import assocPath from 'ramda/src/assocPath'; -import * as fetchPageData from '../../utils/fetchPageData'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import { TOPIC_PAGE } from '#app/routes/utils/pageTypes'; import getInitialData from '.'; -import { TOPIC_PAGE } from '../../utils/pageTypes'; process.env.BFF_PATH = 'https://mock-bff-path'; diff --git a/src/app/routes/utils/fetchDataFromBFF/index.test.ts b/src/app/routes/utils/fetchDataFromBFF/index.test.ts index bac8476af73..f745da9700c 100644 --- a/src/app/routes/utils/fetchDataFromBFF/index.test.ts +++ b/src/app/routes/utils/fetchDataFromBFF/index.test.ts @@ -1,13 +1,13 @@ import { Agent } from 'undici'; -import fetchDataFromBFF from '.'; import { ARTICLE_PAGE, CPS_ASSET, HOME_PAGE, MOST_READ_PAGE, TOPIC_PAGE, -} from '../pageTypes'; -import * as fetchPageData from '../fetchPageData'; +} from '#app/routes/utils/pageTypes'; +import * as fetchPageData from '#app/routes/utils/fetchPageData'; +import fetchDataFromBFF from '.'; jest.mock('../fetchPageData', () => jest.fn().mockImplementation(() => { diff --git a/src/app/routes/utils/fetchDataFromBFF/index.ts b/src/app/routes/utils/fetchDataFromBFF/index.ts index e2fad192b27..968afaa8ca3 100644 --- a/src/app/routes/utils/fetchDataFromBFF/index.ts +++ b/src/app/routes/utils/fetchDataFromBFF/index.ts @@ -1,12 +1,12 @@ -import constructPageFetchUrl from '../constructPageFetchUrl'; -import getEnvironment from '../getEnvironment'; -import { Services, Variants, PageTypes } from '../../../models/types/global'; -import fetchPageData from '../fetchPageData'; -import getErrorStatusCode from '../fetchPageData/utils/getErrorStatusCode'; -import { BFF_FETCH_ERROR } from '../../../lib/logger.const'; -import { FetchError, GetAgent } from '../../../models/types/fetch'; -import nodeLogger from '../../../lib/logger.node'; -import certsRequired from '../certsRequired'; +import constructPageFetchUrl from '#app/routes/utils/constructPageFetchUrl'; +import getEnvironment from '#app/routes/utils/getEnvironment'; +import { Services, Variants, PageTypes } from '#models/types/global'; +import fetchPageData from '#app/routes/utils/fetchPageData'; +import getErrorStatusCode from '#app/routes/utils/fetchPageData/utils/getErrorStatusCode'; +import { BFF_FETCH_ERROR } from '#lib/logger.const'; +import { FetchError, GetAgent } from '#models/types/fetch'; +import nodeLogger from '#lib/logger.node'; +import certsRequired from '#app/routes/utils/certsRequired'; const logger = nodeLogger(__filename); diff --git a/src/app/routes/utils/fetchPageData/utils/getRouteProps/fallbackServiceParam/index.js b/src/app/routes/utils/fetchPageData/utils/getRouteProps/fallbackServiceParam/index.js index 46198ff46d5..23e50a355c6 100644 --- a/src/app/routes/utils/fetchPageData/utils/getRouteProps/fallbackServiceParam/index.js +++ b/src/app/routes/utils/fetchPageData/utils/getRouteProps/fallbackServiceParam/index.js @@ -1,4 +1,4 @@ -import services from '../../../../../../lib/config/services/loadableConfig'; +import services from '#lib/config/services/loadableConfig'; export default url => { const [service] = url.split('/').filter(Boolean); diff --git a/tsconfig.json b/tsconfig.json index 3d549edcdc4..f32b6eaa24c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,8 @@ "noFallthroughCasesInSwitch": true, "paths": { "#app/*": ["src/app/*"], + "#src/*": ["src/*"], + "#nextjs/*": ["ws-nextjs-app/*"], "#contexts/*": ["src/app/contexts/*"], "#components/*": ["src/app/legacy/components/*"], "#containers/*": ["src/app/legacy/containers/*"],