Skip to content

Commit 054d3ac

Browse files
committed
fix: import global CSS only in App component
LIIKUNTA-768. Using Turbopack makes it clear that global stylesheets can only be imported in App component. When running app with a Turbopack, a following warning is printed in terminal: ```shell Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules). ```
1 parent 3ad40cc commit 054d3ac

4 files changed

Lines changed: 3 additions & 2 deletions

File tree

apps/events-helsinki/src/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { appWithTranslation } from 'next-i18next';
1212
import React from 'react';
1313

1414
import '../styles/globals.scss';
15+
import '../styles/askem.scss';
1516
import { ErrorBoundary } from 'react-error-boundary';
1617
import nextI18nextConfig from '../../next-i18next.config.mjs';
1718
import { ROUTES } from '../constants';

apps/hobbies-helsinki/src/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { appWithTranslation } from 'next-i18next';
1111
import React from 'react';
1212

1313
import '../styles/globals.scss';
14+
import '../styles/askem.scss';
1415
import { ErrorBoundary } from 'react-error-boundary';
1516
import nextI18nextConfig from '../../next-i18next.config.mjs';
1617
import { ROUTES } from '../constants';

apps/sports-helsinki/src/pages/_app.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { appWithTranslation } from 'next-i18next';
1212
import React from 'react';
1313

1414
import '../styles/globals.scss';
15+
import '../styles/askem.scss';
1516
import { ErrorBoundary } from 'react-error-boundary';
1617
import nextI18nextConfig from '../../next-i18next.config.mjs';
1718
import { ROUTES } from '../constants';

packages/components/src/app/BaseApp.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import dynamic from 'next/dynamic';
55
import type { SSRConfig } from 'next-i18next';
66
import React from 'react';
77

8-
import '../styles/globals.scss';
9-
import '../styles/askem.scss';
108
import { CmsHelperProvider } from '../cmsHelperProvider';
119
import { MatomoWrapper } from '../components';
1210
import type { createAskemInstance } from '../components/askem';

0 commit comments

Comments
 (0)