valaxyjs / valaxy-theme-starter

🎨 Starter template for valaxy-theme.
https://starter.valaxy.site
MIT License
10 stars 2 forks source link

Running the demo is too slow #1

Closed hairyf closed 2 years ago

YunYouJun commented 2 years ago

What do you mean? I think its hot update works well.

After build, it should work well and be faster.

hairyf commented 2 years ago

What do you mean? I think its hot update works well.

After build, it should work well and be faster.

Well, sorry I didn't explain the situation

I'm not sure if it's an environment issue, I'm running the process as the documentation says

# dev node
pnpm dev
# dev client
pnpm demo

Then wait for the page to display

........zzzzz

image

The page is displayed for at least a minute or more

I want to know what is the reason for this

hairyf commented 2 years ago

When I refresh the page again, the speed of the page still does not change

hairyf commented 2 years ago

GIF

YunYouJun commented 2 years ago

https://user-images.githubusercontent.com/25154432/178099813-71dada02-18cc-42eb-9959-726e7effd97f.mov

My local environment works just fine.

Are you Windows, trying a Unix-like command line? Perhaps the path of Windows caused by a cycle and so on, but I do not have Windows to debug now.

hairyf commented 2 years ago

yes i am window environment, I execute cmd in vscode, using powershell

YunYouJun commented 2 years ago

I execute cmd in vscode, using powershell

Try git bash or zsh or wsl, I thought it might be Powershell, but I couldn't reproduce it.

hairyf commented 2 years ago

Hmm..., I solved it in a fantastic way

I separated the valaxy-theme-[name] through pnpm-workspace, and the running speed is normal at this time

pnpm-workspace.yaml

packages:
- demo
- src

src

- config
- layouts
- styles
- types
- index.ts
# Here is my valaxy-theme-[name] package
- package.json

https://github.com/TuiMao233/valaxy-theme-tentative/tree/master/src

Here is the repository for this use case

https://github.com/TuiMao233/valaxy-theme-tentative

hairyf commented 2 years ago

Yes, and I don't think the directory structure should all be stored in the root directory , At least not too messy when developing

Maybe for this reason, the reference exception in node_modules,For example this case

valaxy-theme-[name] > devDependencies:valaxy-theme-[name] > valaxy-theme-[name]

I'm not very clear about the subject citation mechanism of valaxy, this is my guess

hairyf commented 2 years ago

In addition, I also tested git bash, zsh, wsl, and it is still the same

YunYouJun commented 2 years ago

OK. I will refactor its structure.

YunYouJun commented 2 years ago

Hey, can you try new starter? Maybe it will work now.

hairyf commented 2 years ago

Hey, can you try new starter? Maybe it will work now.

Oh, the structure is clear now and there are no speed issues, great!