@blueprintjs/icons 5.1.4 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/loading-icons.md +6 -4
package/package.json
CHANGED
package/src/loading-icons.md
CHANGED
|
@@ -145,17 +145,19 @@ importing icon modules for you**. Let's take a look at this required configurat
|
|
|
145
145
|
await Icons.load(["download", "caret-down", "endorsed", "help", "lock"]);
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
5. Use a custom loaders with other bundlers, for example Vite.
|
|
148
|
+
5. Use a custom loaders with other bundlers, for example Vite ([see demo Stackblitz here](https://stackblitz.com/edit/blueprint-v5-vite-react-16)).
|
|
149
149
|
|
|
150
150
|
```ts
|
|
151
151
|
import { Icons, IconPaths } from "@blueprintjs/icons";
|
|
152
152
|
|
|
153
153
|
// see https://vitejs.dev/guide/features.html#glob-import
|
|
154
|
-
const iconModules: Record<string, { default: IconPaths[] }> =
|
|
155
|
-
|
|
154
|
+
const iconModules: Record<string, { default: IconPaths[] }> = import.meta.glob(
|
|
155
|
+
[
|
|
156
156
|
"../node_modules/@blueprintjs/icons/lib/esm/generated/16px/paths/*.js",
|
|
157
157
|
"../node_modules/@blueprintjs/icons/lib/esm/generated/20px/paths/*.js",
|
|
158
|
-
]
|
|
158
|
+
],
|
|
159
|
+
{ eager: true },
|
|
160
|
+
);
|
|
159
161
|
|
|
160
162
|
Icons.setLoaderOptions({
|
|
161
163
|
loader: async (name, size) => (
|