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

Support for multiple instance #39

Open
Applelo opened this issue Jan 11, 2024 · 6 comments · May be fixed by #47
Open

Support for multiple instance #39

Applelo opened this issue Jan 11, 2024 · 6 comments · May be fixed by #47
Assignees
Labels
enhancement New feature or request

Comments

@Applelo
Copy link
Contributor

Applelo commented Jan 11, 2024

Currently, multiple instance of the plugin are not possible because of the __spritemap server.
Make /__spritemap editable by the user with the output.name option ?

{

plugins: [
      VitePluginSvgSpritemap('./assets/icons/*.svg', {
        output: {
          filename: '[name].[hash][extname]',
          view: false,
        },
      }),
      VitePluginSvgSpritemap('./assets/flags/*.svg', {
        output: {
          filename: 'flags.[hash][extname]',
          view: false,
        },
      }),
    ],
}
@Applelo Applelo added the enhancement New feature or request label Jan 11, 2024
@Applelo Applelo self-assigned this Jan 11, 2024
@shurco
Copy link

shurco commented Jan 11, 2024

Currently, multiple instance of the plugin are not possible because of the __spritemap server. Make /__spritemap editable by the user with the output.name option ?

{

plugins: [
      VitePluginSvgSpritemap('./assets/icons/*.svg', {
        output: {
          filename: '[name].[hash][extname]',
          view: false,
        },
      }),
      VitePluginSvgSpritemap('./assets/flags/*.svg', {
        output: {
          filename: 'flags.[hash][extname]',
          view: false,
        },
      }),
    ],
}

try this way :

{
  plugins: [
    VitePluginSvgSpritemap([
      "./assets/icons/*.svg",
      "./assets/flags/*.svg",
    ], {
      output: {
        view: false,
      },
    }),
  ]
}

@Applelo
Copy link
Contributor Author

Applelo commented Jan 11, 2024

Yeah I know, but I want to generate two spritemaps, one for my icons, and one for the flags :)

@Applelo Applelo linked a pull request Jan 26, 2024 that will close this issue
@hybrid897
Copy link

@Applelo I have a similar scenario except with a set of map icons that I would like in a different spritemap. Is there an issue blocking the current PR you have raised? Thank you for the plugin :)

@Applelo
Copy link
Contributor Author

Applelo commented Apr 17, 2024

The current PR is blocked because of lack of time on my part. I wish to make an update at the end of this month 🤞

@Applelo Applelo linked a pull request Aug 1, 2024 that will close this issue
@liushuog
Copy link

liushuog commented Aug 2, 2024

May I ask when version 2.3.0 can be released?

@Applelo
Copy link
Contributor Author

Applelo commented Aug 2, 2024

The last time I give an estimate time, I was completely wrong. So what I can say: I am working on it every week. I need to finish the styles callback and add testing for all the new features 😅
7 months since no release is not what I was hoping for this plugin 🫤

For the next version, I hope to do more little release and fix all the bugs fixes reported by everyone (and enforce proper reproduction on issues 🥹).

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

Successfully merging a pull request may close this issue.

4 participants