From bf28d09d3924d11a08e0d6be872c1fb92f3462c2 Mon Sep 17 00:00:00 2001 From: Suren Atoyan Date: Sun, 2 Mar 2025 00:46:07 +0400 Subject: [PATCH] use direct import --- .github/workflows/tests:e2e.yml | 6 +++--- src/Root.tsx | 8 ++++---- src/main.tsx | 6 +++--- tsconfig.app.json | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests:e2e.yml b/.github/workflows/tests:e2e.yml index 2e41fcd..a521a79 100644 --- a/.github/workflows/tests:e2e.yml +++ b/.github/workflows/tests:e2e.yml @@ -9,17 +9,17 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: lts/* - name: Install dependencies run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests run: npm run test:e2e - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 if: always() with: name: playwright-report diff --git a/src/Root.tsx b/src/Root.tsx index a473143..302c8a4 100644 --- a/src/Root.tsx +++ b/src/Root.tsx @@ -1,9 +1,9 @@ import { ComponentType, StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -// from MUI's toolpad we use only Notifications +// from MUI's toolpad we only use Notifications import { NotificationsProvider } from '@toolpad/core/useNotifications'; -import { Provider } from 'jotai'; +import { Provider as JotaiProvider } from 'jotai'; import ThemeProvider from '@/theme/Provider'; @@ -13,13 +13,13 @@ const root = createRoot(container); function render(App: ComponentType) { root.render( - + - + , ); } diff --git a/src/main.tsx b/src/main.tsx index 138ddde..91a55ae 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,3 +1,5 @@ +import App from '@/App'; +import render from '@/root'; import welcome from '@/utils/welcome'; import './index.css'; @@ -10,9 +12,7 @@ import './index.css'; // Importing them with Promise.all (by using HTTP/2/3 multiplexing) we can load them in parallel // and achieve the best possible performance -Promise.all([import('@/root'), import('@/App')]).then(([{ default: render }, { default: App }]) => { - render(App); -}); +render(App); // welcome message for users in the console welcome(); diff --git a/tsconfig.app.json b/tsconfig.app.json index f1c4052..d95f7fe 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -7,7 +7,7 @@ "module": "ESNext", "skipLibCheck": true, "baseUrl": ".", - "paths": { "@/*": ["./src/*"] }, + "paths": { "@/*": ["src/*"] }, /* Bundler mode */ "moduleResolution": "bundler",