#Tauri windows build seems to lose some `sass`

18 messages · Page 1 of 1 (latest)

fallen spire
#

Hi all, bit of a pickle I have here...
My program is built for Windows and MacOS using Vite. We use Bulma in SASS and SCSS for the styling, however, it seems like some of the styles break in the Windows build. These problems are not present in the dev environment, or in the MacOS build.

The example I am allowed to show is in a custom (and very privative) schedule like view where some border lines and background colors are lost.

empty garden
#

I'm not familiar with the tools you are using so just guessing here. It's ok in windows dev build but not release? do you see any networking/console errors in the devtools when it isn't working?

echo imp
#

add a devtools feature to tauri before build, then open the devtools on windows build

fallen spire
#

The inspect panel is available when running yarn tauri build -d. Will double check for network errors.

fallen spire
#
(index):1  Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'nonce-7959847572211008704' 'sha256-fc8brLjOXa0T2/aqklPMqPhqXw8uXQHT6EnXYfyBCGo=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='".

    at 85628 ((index):1:164987)
    at __webpack_require__ ((index):1:249012)
    at (index):1:249657
    at (index):1:249685

I get this error from the console when opening and hooking VueDevtools.

The only network error I get is when I don't open and hook VueDevtools, the error is about the script not loading

fallen spire
#

Updated to Tauri v1.4.0, and all styles are broken on Windows debug build.

#

How this view is supposed to look

#

Do I need to specify a stylesheet to import?

brisk cargo
#

What about console errors?

#

And what happens if you configure csp to null

#

And what happens if you serve the distDir and open it in any chromium based browser

fallen spire
#

I get two console errors, which I am expecting. One is a 404 from a script tag looking for VueDevtools failing. The other is a missing CSS class for a map component which I have known about since importing the component last year.
csp has quite a bit of text in it added by a colleague when he switched us over to Tauri:

"security": {
      "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self';worker-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
    },
#

How do I serve the distDir?

fallen spire
brisk cargo
fallen spire
#

Finally got around to getting that preview running.
Left to right, the browsers are:
Chrome, Firefox, and Edge. Smells like this isn't a Tauri issue, but a Chromium compatability issue

brisk cargo
#

yep, looks like it