mirror of
https://github.com/gromlab-ru/svg-sprites.git
synced 2026-07-22 04:40:17 +03:00
feat: добавить серверную генерацию спрайтов
This commit is contained in:
@@ -30,7 +30,8 @@ result.manifestPath
|
||||
Next.js modes additionally return `router` and `bundler`.
|
||||
For bare `standalone`, `target` is `static`; standalone bundler and React modes
|
||||
return `vite` or `webpack`; Next.js modes return their full exact mode as the
|
||||
target.
|
||||
target. `standalone@server` returns `server`; its `spritePath` identifies the
|
||||
standard content-addressed profile and `manifestPath` identifies the server manifest.
|
||||
|
||||
For static standalone mode, use `result.spritePath` in a build script to publish the
|
||||
SVG under an application URL:
|
||||
@@ -105,6 +106,11 @@ export default defineSpriteConfig({
|
||||
|
||||
`defineSpriteConfig` is an identity helper for TypeScript autocomplete. JavaScript can export the same object with `export default`, while JSON contains the object directly.
|
||||
|
||||
The public `ServerSvgInput`, `ServerSpriteManifest`, `ServerSpriteAsset`, and
|
||||
`SpriteCompileProfile` types describe `standalone@server` inputs and release data.
|
||||
A consumer uses the same API with `source: 'remote'` and one local path or HTTP(S)
|
||||
manifest URL in `input`.
|
||||
|
||||
## Specialized wrappers
|
||||
|
||||
The specialized functions are available as wrappers around `generateSprite`:
|
||||
|
||||
Reference in New Issue
Block a user