Skip to content
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

Images not generated with router.base defined #338

Closed
lapski opened this issue Jun 25, 2021 · 0 comments · Fixed by #339
Closed

Images not generated with router.base defined #338

lapski opened this issue Jun 25, 2021 · 0 comments · Fixed by #339

Comments

@lapski
Copy link

lapski commented Jun 25, 2021

Using target: 'static', nuxt-img works as expected with router.base defined when running yarn dev, but images are not generated/working after yarn generate. If I remove router.base, it works.

With router.base:

Screen Shot 2021-06-25 at 12 12 43 AM

Screen Shot 2021-06-25 at 12 05 46 AM

Without router.base:

Screen Shot 2021-06-25 at 12 13 08 AM

Screen Shot 2021-06-25 at 12 04 52 AM

@nuxt/image: "0.4.17"
nuxt: "^2.15.3
Node: v14.16.1

nuxt.config:

target: 'static',

buildModules: [
  '@nuxt/image',
],

router: {
  base: '/new'
}

...

usage:

<nuxt-img
  src="/image.jpg"
  sizes="md:100vw lg:100vw xxl:2000px"
/>

Maybe I'm just missing something..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant