Mark Brouch
Mark Brouch
NNuxt
Created by Mark Brouch on 6/11/2024 in #❓・help
Nuxt 3.12.1 - Invalid link type image/x-icon in nuxt.config.ts app.head.link
W3C specs state that the type attribute must be a valid MIME type string: https://html.spec.whatwg.org/multipage/semantics.html#attr-link-type A valid MIME type string is then defined as: "a string that matches the media-type token production." https://mimesniff.spec.whatwg.org/#valid-mime-type The media-type token production is simply a case-insensitive pair of strings separated by a / with an optional semicolon delimited parameters as key/value pairs separated by =. For example: text/html;charset=utf-8. https://www.rfc-editor.org/rfc/rfc9110#name-media-type Therefore, I think think the appropriate type should be simply string until such time as a regex type is supported in TypeScript.
3 replies
NNuxt
Created by Mark Brouch on 6/11/2024 in #❓・help
Nuxt 3.12.1 - Invalid link type image/x-icon in nuxt.config.ts app.head.link
@harlan looping you in to get your thoughts on this 🙏
3 replies
NNuxt
Created by Mark Brouch on 2/14/2024 in #❓・help
How do you add a directory of files to publicAssets at build time?
in case someone in the future comes across this, my solution was:
nuxt.hook('nitro:config', nitroConfig => {
nitroConfig.publicAssets ||= [];
nitroConfig.publicAssets.push({
dir: resolvePath('node_modules/path/to/dir'),
baseURL: '/my-node-module-assets',
maxAge: 60 * 60 * 24 * 365, // 1 year
});
});
nuxt.hook('nitro:config', nitroConfig => {
nitroConfig.publicAssets ||= [];
nitroConfig.publicAssets.push({
dir: resolvePath('node_modules/path/to/dir'),
baseURL: '/my-node-module-assets',
maxAge: 60 * 60 * 24 * 365, // 1 year
});
});
12 replies
NNuxt
Created by Mark Brouch on 2/14/2024 in #❓・help
How do you add a directory of files to publicAssets at build time?
ah figured it out! just needed to create a resolver to get the correct path. All is working now the way I wanted it, thanks @ManUtopiK!
12 replies
NNuxt
Created by Mark Brouch on 2/14/2024 in #❓・help
How do you add a directory of files to publicAssets at build time?
hmm @ManUtopiK I tried that, adding in a nuxt module with:
nuxt.hook('nitro:config', nitroConfig => {
nitroConfig.publicAssets ||= [];
nitroConfig.publicAssets.push({
dir: 'node_modules/path/to/dir',
baseURL: '/my-node-module-assets',
maxAge: 60 * 60 * 24 * 365, // 1 year
});
});
nuxt.hook('nitro:config', nitroConfig => {
nitroConfig.publicAssets ||= [];
nitroConfig.publicAssets.push({
dir: 'node_modules/path/to/dir',
baseURL: '/my-node-module-assets',
maxAge: 60 * 60 * 24 * 365, // 1 year
});
});
However, I still am not seeing these assets in the nuxt dev server. @handshake manually copying these assets to my public dir is what I'm currently doing, however I'd rather have a solution that mounts a specific node_modules dir so I don't have to copy over the files every time that particular package is updated.
12 replies
NNuxt
Created by Mark Brouch on 5/10/2024 in #❓・help
How to configure multiple providers of same type in nuxt-image
I opened a pull request that allows full cloudinary urls to be used as src: https://github.com/nuxt/image/pull/1361
2 replies
NNuxt
Created by Mark Brouch on 2/14/2024 in #❓・help
How do you add a directory of files to publicAssets at build time?
unfortunately no
12 replies
NNuxt
Created by Mark Brouch on 4/20/2024 in #❓・help
Override eslint flat config issue
2 replies