caoxiemeihao / nuxt-electron

Integrate Nuxt and Electron
MIT License
184 stars 21 forks source link

Build Not Including Tailwindcss #43

Closed Patrity closed 5 months ago

Patrity commented 1 year ago

There may be a procedure necessary for including tailwind files into the build, however, currently it appears when using TailwindCSS and Nuxt-electron, the tailwind files are not built. When using the dev command, tailwind styling does render, it is only when serving the built project.

To Reproduce: I have created a bare basic project to demonstrate: https://github.com/Patrity/electron-nuxt-example In this project, I first created a blank nuxt 3 project, then added tailwind css. I built the project then served it with node to verify that tailwind css was rendered properly. I then followed the setup instructions here: https://github.com/caoxiemeihao/nuxt-electron and also included the main.ts from the example project here: https://github.com/caoxiemeihao/nuxt-electron/blob/main/examples/quick-start/electron/main.ts

Expected result: image

Built result: image

Patrity commented 1 year ago

I believe the issue is solved by setting ssr to false. I verified it on the demo project, but also a larger project I am working with. I submitted a PR to add this step to the setup process. https://github.com/caoxiemeihao/nuxt-electron/pull/44

I noticed that there is a note stating that SPA mode will be enabled, but it either is not working properly or ssr still needs to be manually set.

vuthanhbayit commented 8 months ago

I believe the issue is solved by setting ssr to false. I verified it on the demo project, but also a larger project I am working with. I submitted a PR to add this step to the setup process. #44

I noticed that there is a note stating that SPA mode will be enabled, but it either is not working properly or ssr still needs to be manually set.

Thanks for saving my work day