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

build: upgrade ipx with sharp installation enahancenments #1102

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Nov 10, 2023

This PR is to try sharp 0.33 via ipx-nightly channel. (ipx is also upgraded since i plan to make some additional changes in there)

See unjs/ipx#190 and lovell/sharp#3750 for more context.

Previously since sharp dependes on a build script that was likely to break installation of @nuxt/image, it was an optional dependency (which well, makes issues but will be detected later in build/runtime!). Since the new dependency installation method has non of these issues, ipx can be safely a normal dependency now 🥳

🧪 Try via nightly channel

Add to the resolutions in package.json

{
  "resolutions": {
    "ipx": "npm:ipx-nightly@latest"
  }
}

Update nuxt.config.ts with this temporary workaround for correct production externals support:

export default defineNuxtConfig({
  modules: ["@nuxt/image"],
  nitro: {
    externals: {
      traceAlias: {
        "ipx-nightly": "ipx",
      },
    },
  },
});

🐛 Issues

Copy link

cloudflare-pages bot commented Nov 10, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 75c6aab
Status: ✅  Deploy successful!
Preview URL: https://d2822fe0.nuxt-image.pages.dev
Branch Preview URL: https://build-ipx-dep.nuxt-image.pages.dev

View logs

@pi0 pi0 marked this pull request as draft November 10, 2023 11:49
@pi0 pi0 changed the title build(ipx): use ipx with sharp 33 build: upgrade ipx with sharp installation enahancenments Nov 10, 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

Successfully merging this pull request may close these issues.

None yet

1 participant