Releases: forge42dev/vite-plugin-icons-spritesheet
v2.2.1
Fix for assetInlineLimit
Fixed an issue where the spritesheet wasn't picked up in certain conditions
What's Changed
- Don't minify built output by @wKovacs64 in #21
New Contributors
- @wKovacs64 made their first contribution in #21
Full Changelog: v2.2.0...v2.2.1
v2.2.0 - Asset Inline Limit support
Vite assetInlineLimit respect
From v2.2.0 The plugin will respect your assetsInlineLimit defined in your Vite config and will only ignore it for the spritesheets generated by the plugin itself, meaning you don't have to opt-out of the inlining of small assets just to use this plugin
Full Changelog: v2.1.0...v2.2.0
v2.1.0 - Multiple configs + formatters
Multiple configs are here!
From 2.1.0 you can pass in an array of configs instead of a single one which will generate multiple watchers and bundles accordingly. Check out the README for details on this!
Full example:
iconsSpritesheet([
{
withTypes: true,
inputDir: "icons",
outputDir: "./app/icons",
formatter: "prettier"
},
{
withTypes: true,
inputDir: "icons",
outputDir: "./public/icons",
formatter: "biome",
pathToFormatterConfig: "./biome.json",
}
]),
Formatting the outputs!
From 2.1.0 you can specify prettier
or biome
as formatters which will format your output files before they are generated and then write them to the directories. You can also specify a path to your formatter config to be used by the formatter under the hood via pathToFormatterConfig
Full example:
iconsSpritesheet({
withTypes: true,
inputDir: "icons",
outputDir: "./public/icons",
// Linter and path to config specified
formatter: "biome",
pathToFormatterConfig: "./biome.json",
}),
What's Changed
- Change license field in package.json to MIT by @KubaJastrz in #15
New Contributors
- @KubaJastrz made their first contribution in #15
Full Changelog: v2.0.0...v2.1.0
v2.0.0 - Runs on build
Runs on build
The plugin will now run BEFORE your build starts so the icon artifact is output to the location before the building starts.
Changed the types output
Now uses the generated array to generate the type instead of duplicating both for a smaller file
Full Changelog: v1.3.0...v2.0.0
v1.3.0
Better Vite versioning support
The plugin uses Vite internal helpers to resolve the path but this was causing issues in vite.config.ts
where the types were locked to a specific Vite version. The typesafety has been moved inside of the plugin now and the return type ahs been loosened.
Also, Vite is now a peerDependendency instead of a dependency so it can work with a bigger range of Vite versions.
Full Changelog: v1.2.1...v1.3.0
v1.2.1
v1.2.0
Icon naming conventions
From v1.2.0 onwards you can change and customize your icon naming convention to suite your needs.
What's Changed
- Added ability to change the icon name convention by @AlemTuzlak in #6
New Contributors
- @AlemTuzlak made their first contribution in #6
Full Changelog: v1.1.2...v1.2.0
v1.1.2
Runs on initial vite dev server start
Now the icons will be generated as soon as you start your server.
What's Changed
- Fix typo in import statement for iconsSpritesheet by @OnurGvnc in #3
- run
generateIcons
at startup if sprite.svg does not exist by @OnurGvnc in #4
New Contributors
Full Changelog: v1.1.1...v1.1.2
v1.1.1
Fixed an issue where if there were no files in the output dir the plugin didn't work properly
Full Changelog: 1.1.0...v1.1.1
1.1.0
Improvements to writes
Now only writes if there are any changes, does not write on every change.
Listener improvements
Listens to add/delete events as well and outputs the icons when a new one is added or old one is removed.
Full Changelog: 1.0.0...1.1.0