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

@vite-pwa/[email protected] breaks the asset generator #44

Open
MehrdadKhnzd opened this issue Mar 30, 2024 · 2 comments
Open

@vite-pwa/[email protected] breaks the asset generator #44

MehrdadKhnzd opened this issue Mar 30, 2024 · 2 comments

Comments

@MehrdadKhnzd
Copy link

Hi,
After updating @vite-pwa/astro to 0.3.1 from 0.3.0, the asset generator doesn't work properly.
It still generates the artifacts, but specifically, import { pwaAssetsHead } from 'virtual:pwa-assets/head' does not work as expected anymore, as the links array inside of it is empty so it can't be used to render any of the required links or the theme-color meta tag.
Reverting it back to 0.3.0 fixed the problem for now.

@userquin
Copy link
Member

what's the error? I cannot run the examples on my local, the pnpm monorepo requires adding the following to the Astro config file:

  vite: {
    server: {
      fs: {
        // Allow serving files from hoisted root node_modules
        allow: ['../..']
      }
    },
  },

@userquin userquin transferred this issue from vite-pwa/assets-generator Mar 30, 2024
@userquin
Copy link
Member

userquin commented Mar 30, 2024

Try adding sharp and sharp-ico to "resolutions" entry to your package.json file with 0.32.0 version: sharp 0.33.0+ change native libraries, or try installing the corresponding native packages.

"resolutions": { "sharp": "0.32.6" }

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

2 participants