-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module doesn't work with nuxt layer images #940
Comments
I have the same issue. Images in the Layer setup
// ./layer-2/nuxt.config.ts
export default defineNuxtConfig({
extends: ["../layer-1"],
})
Problems statementUsing <!-- response will be 404 -->
<nuxt-img src="/image.png"/> Using plain html: <!-- response is 200 -->
<img src="/image.png"/> Basically |
I fixed it by adding this to the base layer / // ./layer-1/nuxt.config.ts
import { createResolver } from "@nuxt/kit"
const { resolve } = createResolver(import.meta.url)
export default defineNuxtConfig({
image: {
dir: resolve("./public"),
},
}) // ./layer-2/nuxt.config.ts
export default defineNuxtConfig({
extends: ["../layer-1"],
}) But this approach will make the |
@danielroe apologies for pinging you; is there something we can do to fix this? So moving |
@darthf1 Here would be my debugging steps:
|
Attaching reproduction: Edit: After reading the code and confirming, the issue only affects dev server. In production layers work as expected. |
Closing as the issue only affects dev environment. |
I do not recall exactly how, but the issue has been fixed. Or at least does not seem to reproduce using the link above with latest @Baroshem When has the policy changed to "DX can be broken, we care only about production"? Nuxt approach, if anything, usually seems the complete opposite. Not that I oppose, but your closing comment seems a bit odd. |
It wasnt. We still care about DX a lot. I was just going through the old issues in the repo to help clean it and make it easier to work with. I should probably add more descriptive comment than that but after doing that for the X other issues I was lacking creativity :) |
Hi there. Thanks for cool module.
I use "nuxt-layers" with images in public folder. Also, I use default config for "nuxt-image" module for my test.
Everything is good with main project images, they loaded correct.
As for images from layer, there are problems. I think, this images don't include in build process in time...
Could you give me some recommendations about that?
The text was updated successfully, but these errors were encountered: