FabiansGeikinsSpeckle
How to stop build hashes from changing between environments?
I'm trying to build the app and upload its sourcemaps in 2 different CI steps, but for some reason the app build builds different filenames in both scenarios, even tho the git commit is the same.
I even made sure that sourcemaps are built in both scenarios (cause apparently just toggling source maps changes the filename hashes, which is absurd), but still - the filename content hashes end up being different.
What controls the contenthash and how do I ensure it stays the same across builds in different environments?
7 replies
How do disable SSR entirely?
Even when setting
ssr: false
in the nuxt config, the production build results in a server application that must be ran. I want the app to be CSR only thus it would only need an HTML file and JS/CSS files to send to the client. If a server is needed at all, it's only needed to serve the assets to the client instead of doing any kind of processing.4 replies
Why does Nuxt/Vite bundle the same library version twice under some circumstances?
I've had this issue with prosemirror and vee-validate where the packages didn't work correctly, because they relied on some sort of global state or Symbols that were bundled twice.
I fixed the issue by adding the packages to
vite.resolve.dedupe
in the nuxt config, but why do I need to do this in the first place? Why would it bundle a library twice?
In my case I think it happened because I have a monorepo with a UI component package and a nuxt app. Nuxt app has vee-validate
installed and the UI component package has vee-validate
installed as well. And I'm guessing Nuxt got confused when it saw vee-validate
at 2 different locations and bundled them twice.1 replies
How to obfuscate/hash some of the build output file names?
I use a
mixpanel
NPM package to enable tracking through Mixpanel, but the package's build is called mixpanel.js
which doesn't get changed any way when bundled by Nuxt. And this keeps triggering ad blockers when they see something with mixpanel
in the URL being requested by the app.
So are there any vite/rollup/nuxt build settings I can use to obfuscate the name of the file in the build output or change it to something else?4 replies
Rendering Nuxt error page when middleware throws in client-side
It appears that the Nuxt error page only renders when I do a full page load, but if I'm just navigating to the failing route on the client-side, all it does is cancel the route transition and show an error in the console.
How can I make a middleware with
abortNavigation()
show the nuxt error page when on clientside as well?2 replies
Prevent page re-mounting on route param change
It appears that the entire Nuxt page gets unmounted & re-mounted when I change a route param (e.g. route.param.x), even tho the new route is the same one, just with a different param.
Is there any way to avoid this?
4 replies
How to change runtimeConfig values in production without rebuilding?
It seems to me that during the production build the runtimeConfig values are baked into the build and thus can't be changed by env variables when actually running that build. Is that the case?
I was trying to build the app without any env variables available in the build step (because why would you need it, if you can feed them in during runtime?) and this doesn't work, the values are missing when running the build, even if they're available as env variables as that point.
1 replies