You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How `<symbol>``id` attribute should be named. All patterns from [loader-utils#interpolateName](https://github.com/webpack/loader-utils#interpolatename)
90
+
How `<symbol>``id` attribute should be named. All patterns from [loader-utils#interpolateName](https://github.com/webpack/loader-utils#interpolatename)
91
91
are supported.
92
92
93
93
### `symbolRegExp` (default `''`)
@@ -103,9 +103,9 @@ By default depends on used webpack version: `true` for webpack >= 2, `false` oth
103
103
104
104
## Runtime configuration
105
105
106
-
When you require an image, loader transforms it to SVG `<symbol>`, adds it to the special sprite storage and returns class instance
107
-
that represents symbol. It contains `id`, `viewBox` and `content` (`id`, `viewBox` and `url` in extract mode)
108
-
fields and can later be used for referencing the sprite image, e.g:
106
+
When you require an image, loader transforms it to SVG `<symbol>`, adds it to the special sprite storage and returns class instance
107
+
that represents symbol. It contains `id`, `viewBox` and `content` (`id`, `viewBox` and `url` in extract mode)
108
+
fields and can later be used for referencing the sprite image, e.g:
109
109
110
110
```js
111
111
importtwitterLogofrom'./logos/twitter.svg';
@@ -128,10 +128,10 @@ By default it depends on [`target`](https://webpack.js.org/configuration/target)
128
128
-`svg-sprite-loader/runtime/browser-sprite.build` for 'web' target.
129
129
-`svg-sprite-loader/runtime/sprite.build` for other targets.
130
130
131
-
If you need custom behavior, use this option to specify a path of your sprite implementation module.
131
+
If you need custom behavior, use this option to specify a path of your sprite implementation module.
132
132
Path will be resolved relative to the current webpack build folder, e.g. `utils/sprite.js` placed in current project dir should be written as `./utils/sprite`.
133
-
134
-
Example of sprite with custom mounting target (copypasted from [browser-sprite](https://github.com/kisenka/svg-sprite-loader/blob/master/runtime/browser-sprite.js)):
133
+
134
+
Example of sprite with custom mounting target (copypasted from [browser-sprite](https://github.com/kisenka/svg-sprite-loader/blob/master/runtime/browser-sprite.js)):
Path to node.js script that generates client runtime.
158
+
Path to node.js script that generates client runtime.
159
159
Use this option if you need to produce your own runtime, e.g. React component configured with imported symbol. [Example](https://github.com/kisenka/svg-sprite-loader/tree/master/examples/custom-runtime-generator).
160
160
161
161
### `runtimeCompat` (default `false`, deprecated)
@@ -190,23 +190,38 @@ Enabled automatically for images imported from css/scss/sass/less/styl/html file
`[hash]` in sprite filename will be replaced by it's content hash.
207
+
`[hash]` in sprite filename will be replaced by it's content hash.
208
208
It is also possible to generate sprite for each chunk by using `[chunkname]` pattern in spriteFilename option. This is experimental feature, use it with caution!
0 commit comments