While added react-router in ./src/App.tsx
there was no problem on netlify or vercel build-time. But, error occurs when I imported them from a custom folder like...
But in a local machine, it is ok while run: yarn build
src
│___App.tsx
|___Router.tsx
│
└───pages
│ |___HomePage.tsx
| |___Notfound.tsx
| |___index.ts
I'm exporting all page components from ./src/pages/index.ts
.
Node Version: 18.x
Vite: 4.x
Plugin: @vitejs/plugin-react
Typescript: 4.9.x
repository: (PR) https://github.com/0xMahabub/react-vite-ts-swc-zustand/pull/2
I have tried to figure this out but couldn't get it myself I wish to find the actual problem and its solution and get rid of this issue. Then I can go ahead.
CodePudding user response:
It looks like, you forgot to add files in pages
directory to staged
files when you were commiting them... because they are not in you repo
just write git add .
(if you have .gitignore file!) in you root folder and then commit>push