Mark Brouch
Nuxt 3.12.1 - Invalid link type image/x-icon in nuxt.config.ts app.head.link
After upgrading to Nuxt 3.12.1 from 3.11.1, one of my
app.head.link
items has an invalid type:
I believe this stems from the use of zhead, which attempts an exhaustive list of valid MIME types as described in this issue: https://github.com/harlan-zw/zhead/issues/23.
Given the opportunity for many unsupported MIME types, I suggest that the link type property not attempt an exhaustive list of MIME types.3 replies
How to configure multiple providers of same type in nuxt-image
I have the need to access several different Cloudinary clouds (with different
baseURL
s) from my Nuxt app using the Image module. I can't seem to figure out a way to configure multiple different Cloudinary providers in nuxt.config.ts
however. Am I missing an obvious config method for doing this, or is there some other workaround I could try?
For example, say I have 2 separate Cloudinary clouds: https://cdn1.example.com/images/upload
and https://cdn2.example.com/images/upload
. In nuxt.config.ts
, I can configure one of them like:
but there is no way to also have cdn2.example.com
configured.
Even with a default cloudinary url (not using cdn), there's no way to configure multiple clouds, for example:
- https://res.cloudinary.com/my-cloud-1/images/upload
- https://res.cloudinary.com/my-cloud-2/images/upload
If you try nuxt.config.ts
:
and then try setting your source in an image to the correct cloud:
then transformations will not work because they are appended after the baseURL
and need to come after the <cloud-name>/images/upload
instead.2 replies
Override eslint flat config issue
Not sure if this is a bug or if I'm doing it wrong since I'm new to eslint 9.0 flat configs, but...
I'm using the new nuxt eslint config (https://eslint.nuxt.com/) and I'm trying to override the
no-unused-vars
rule in my eslint.config.mjs file like this:
However, when I run eslint .
on my project I get an error saying: 'Error: ESLintFlatConfigUtils: Failed to locate config with name "nuxt/javascript"'. I can fix this problem by changing the override name to @eslint/js/recommended
, but this causes nuxt dev tools to show an error: 'Error: ESLintFlatConfigUtils: Failed to locate config with name "@eslint/js/recommended"'. It seems like dev tools and eslint are opposed with the names available, possibly due to some kind of aliasing under the hood?
For reference, these are the available names in nuxt dev tools:
And these are the available names to eslint from the CLI:
2 replies
How do you add a directory of files to publicAssets at build time?
I'm trying to add a directory of files (wasm and tflite models) to my publicAssets directory at build time so that my application can access these files by url during runtime.
It seems that the way to do this would be via the Nuxt config:
However, with this config I don't see the assets in my
.output/public
dir after building either dev or production. Is this a bug, or is there a different way to acheive this?12 replies