feat-agency / vite-plugin-webfont-dl

⚡ Webfont Download Vite Plugin - Make your Vite site load faster
MIT License
302 stars 11 forks source link

[FR] respect manifest setting #9

Closed vandres closed 2 years ago

vandres commented 2 years ago

I am having a setup, where the entry point is not a static index.html but a server generated file. (Craft CMS).

To make that work, I am using the manifest setting of Vite

    build: {
        emptyOutDir: true,
        manifest: true,
        outDir: '../web/static/',
    },

That generated a file like this:

{
  "index.html": {
    "file": "assets/index.c18ecf21.js",
    "src": "index.html",
    "isEntry": true,
    "css": [
      "assets/index.079e947d.css"
    ]
  }
}

I would love to see the generated webfont.css in the css-index too, like:

{
  "index.html": {
    "file": "assets/index.c18ecf21.js",
    "src": "index.html",
    "isEntry": true,
    "css": [
      "assets/index.079e947d.css",
      "assets/webfonts.e0bb4bd3.css"
    ]
  }
}

Is that somehow already possible? If not, I would like to submit a feature request for it.

0xb4lint commented 2 years ago

Hi @vandres!

We've managed to resolve this issue by releasing v3.0.0.

vandres commented 2 years ago

Thank you very much! Already using it :)