FabiansGeikinsSpeckle
FabiansGeikinsSpeckle
NNuxt
Created by FabiansGeikinsSpeckle on 6/14/2024 in #❓・help
How to stop build hashes from changing between environments?
The differences I have between the 2 CI step environments: - Project is stored at different locations in the filesystem - One has git, the other one might not - One runs in a docker image based on a slim node image, the other runs in a default CircleCI worker environment
7 replies
NNuxt
Created by FabiansGeikinsSpeckle on 5/18/2023 in #❓・help
How do disable SSR entirely?
I was hoping for the possibility to just deploy the static build to netlify or something, but this requires me to actually run a server somewhere
4 replies
NNuxt
Created by FabiansGeikinsSpeckle on 3/23/2023 in #❓・help
How to obfuscate/hash some of the build output file names?
@ArwanceR thanks that put me on the right path. I couldn't use those exact values tho, that broke the build, I think the prefix actually has to be /_nuxt/ not /public. I ended up just using the same approach the vite builder uses in its source code for asset file names:
import { join } from 'path'
import type { OutputOptions } from 'rollup'
import { withoutLeadingSlash } from 'ufo'
import { sanitizeFilePath } from 'mlly'
import { filename } from 'pathe/utils'

// Copied out from nuxt vite-builder source to correctly build output chunk/entry/asset/etc file names
const buildOutputFileName = (chunkName: string) =>
withoutLeadingSlash(
join('/_nuxt/', `${sanitizeFilePath(filename(chunkName))}.[hash].js`)
)
import { join } from 'path'
import type { OutputOptions } from 'rollup'
import { withoutLeadingSlash } from 'ufo'
import { sanitizeFilePath } from 'mlly'
import { filename } from 'pathe/utils'

// Copied out from nuxt vite-builder source to correctly build output chunk/entry/asset/etc file names
const buildOutputFileName = (chunkName: string) =>
withoutLeadingSlash(
join('/_nuxt/', `${sanitizeFilePath(filename(chunkName))}.[hash].js`)
)
4 replies
NNuxt
Created by FabiansGeikinsSpeckle on 3/20/2023 in #❓・help
Rendering Nuxt error page when middleware throws in client-side
Doesn't appear that this is possible. You can set fatal: true, but the error page is going to render at the current route, not at the new one, and error.stackTrace is rendered differently as well - when created during SSR it was HTML tags in it for proper styling
2 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
i'll try and look into why it's being bundled in twice
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
2 different lines with the same content essentially, weird
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
No description
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
I just noticed that there's actually only 1 file being downloaded, I'm guessing it shows up as 2 in the search because of sourcemaps or something? But this single .js file seems to have the entire prosemirror-state package appearing twice
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
so whenever I import tiptap, somewhere down the line prosemirror is loaded
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
not really, it's an indirect dependency that tiptap (a text editor) relies on, that's what I'm using directly
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
No description
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 2/6/2023 in #❓・help
How to prevent NPM package from being loaded/ran twice in the client build?
@Fabian B. seems to be loading twice in a prod build as well, yes
13 replies
NNuxt
Created by FabiansGeikinsSpeckle on 1/11/2023 in #❓・help
Prevent page re-mounting on route param change
setting a static key through definePageMeta worked!
4 replies
NNuxt
Created by FabiansGeikinsSpeckle on 1/11/2023 in #❓・help
Prevent page re-mounting on route param change
No description
4 replies
NNuxt
Created by FabiansGeikinsSpeckle on 1/11/2023 in #❓・help
Prevent page re-mounting on route param change
it appears that when the route param changes, Nuxt changes the :key of a parent component of the page which causes the re-render
4 replies
NNuxt
Created by FabiansGeikinsSpeckle on 11/23/2022 in #❓・help
How to upgrade from RC to stable using `nuxi`?
I meant I would set the new version in package.json and run yarn, that would update the lock file
8 replies
NNuxt
Created by FabiansGeikinsSpeckle on 11/23/2022 in #❓・help
How to upgrade from RC to stable using `nuxi`?
when doing nuxi upgrade
8 replies
NNuxt
Created by FabiansGeikinsSpeckle on 11/23/2022 in #❓・help
How to upgrade from RC to stable using `nuxi`?
i was under the assumption that nuxi usually did the proper upgrade & cleanup
8 replies
NNuxt
Created by FabiansGeikinsSpeckle on 11/23/2022 in #❓・help
How to upgrade from RC to stable using `nuxi`?
that's the question - what do I need to update? if it would just be 'nuxt' then I could just make the change in package.json and that would be that, but usually there are also a ton of indirect dependencies that change
8 replies
NNuxt
Created by FabiansGeikinsSpeckle on 11/23/2022 in #❓・help
How to upgrade from RC to stable using `nuxi`?
@l422y can't just remove yarn.lock, the app is a part of a monorepo and this could break dependencies of other packages
8 replies