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

some bugs in custom provider (default provider, shortcut, types) #161

Closed
reslear opened this issue Jan 26, 2021 · 7 comments
Closed

some bugs in custom provider (default provider, shortcut, types) #161

reslear opened this issue Jan 26, 2021 · 7 comments

Comments

@reslear
Copy link
Contributor

reslear commented Jan 26, 2021

"nuxt-edge": "2.15.0-26856070.8350560"
"@nuxt/image": "^0.2.1"

iam search bugs:

  1. nuxt-picture provider and default custom provider not working (nuxt-img work)
    return this.$img(this.src, {
    provider: this.provider,
    preset: this.preset,
    modifiers: this.nModifiers
    }).url
    don't find in
    const sources = formats.map((format) => {
    const sizes = this.$img.getSizes(this.src, {
    sizes: this.sizes,
    width: this.nWidth,
    height: this.nHeight,
    modifiers: {
    ...this.nModifiers,
    format
    }
    })
  2. work in nuxt-config path only dot start ./providers/custom not shortcut ~/providers/custom
  3. not importable types for custom provider getImage - import type {} from "@nuxt/image"
    missing in dist types this
    export type ProviderGetImage = (src: string, options: ImageOptions, ctx: ImageCTX) => ResolvedImage
@pi0
Copy link
Member

pi0 commented Jan 26, 2021

Hi @reslear thanks for making issue. Please note that image module is WIP both API and Docs so anything can be expected. I will keep it open until fixing.

@reslear
Copy link
Contributor Author

reslear commented Jan 26, 2021

@pi0 yes i know that this is WIP) this is my little help, if you can call it that) maybe next my step opening PRs, thanks)

@pi0
Copy link
Member

pi0 commented Jan 27, 2021

1 should be fixed by #169, 2 by 930e192 and for 3 feel free making a PR (couldn't follow issue since ProviderGetImage is already exerted)

@reslear
Copy link
Contributor Author

reslear commented Feb 4, 2021

hi @pi0 i am testing new version 0.3, but ProviderGetImage not include export type in dist types.d.ts
for importing

Снимок экрана 2021-02-04 в 12 58 02

import { ProviderGetImage } from "@nuxt/image"
export const getImage: ProviderGetImage = () => {} 

it seems siroc merge all types and cut public exports

@reslear
Copy link
Contributor Author

reslear commented Feb 12, 2021

hi @danielroe danielroe/siroc@ebc5a02 will solve this problem #161 (comment) ?

@danielroe
Copy link
Member

Yes, this appears to be fixed in the latest version of siroc.

@pi0
Copy link
Member

pi0 commented Apr 6, 2021

Closing since all above are fixed 😄 And thanks for contribution @reslear

@pi0 pi0 closed this as completed Apr 6, 2021
procrates pushed a commit to procrates/nuxt-image that referenced this issue Feb 21, 2023
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

No branches or pull requests

3 participants