#Frontend problems in production environment ( Nuxt 3 )

1 messages · Page 1 of 1 (latest)

golden hedge
#

Hi, I'm contacting you to see if any of you have had a problem like mine.
The application in dev version has almost no problems, but when I try to build, that's when the problems start ( Nuxt 3 with NuxtUI / NuxtUI Pro ) :

  • Background video not loaded ( it's stored in the “public” folder of Nuxt, normally I should store it in the “resources” folder of tauri but to be confirmed. )
  • Bottom right, the flag is not loaded, it's loaded from an external url that has been populated in tauri's http scope.
  • Images such as the logo are not loaded. They are also present in the Nuxt public folder with a pre-rendering made by Nitro with IPX ( via Nuxt Image ).
  • Icons are not loaded either, I tried several configurations for Nuxt UI but they don't want to load.
  • Font isn't loaded too

If anyone has a solution or has had this type of problem with Nuxt.

Language files that are loaded directly from the “lang” folder in the frontend are correctly loaded, despite the fact that the documentation recommends putting them in the tauri “resources” folder.

You can find here :

  • tauri.conf.json
  • nuxt.config.ts

https://gist.github.com/TheYakuzo/ab925595713e16c9752d775de30de742

Gist

GitHub Gist: instantly share code, notes, and snippets.

inland kayak
#

I don't know anything about nuxt so i can't give explicit help, but did you try a debug build (via the --debug flag -> output in target/debug/)? They will have the devtools enabled so you can check the console and network tabs for errors.

#

Also maybe run nuxt start (after building your frontend) and check how it behaves in the browser.

golden hedge
golden hedge
golden hedge
#

It was because of security:

“security”: {
            “csp” : “default-src ‘self’ ; connect-src ipc : http://ipc.localhost ; media-src stream : http://stream.localhost asset : http://asset.localhost”,

It's really my passion to get stuck on a problem for 5 hours, ask the question and 10 minutes later find the source of the problem. I love it!