vite-awesome-svg-loader 3.0.1 → 3.0.3

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/index.d.mts CHANGED
@@ -161,8 +161,7 @@ interface SvgLoaderOptions {
161
161
  *
162
162
  * Can be a list of selectors or selectors-per-files specifiers.
163
163
  *
164
- * **You probably don't need this option.** Think of other ways to solve your problem. "Recipes" section
165
- * in the demos may help you.
164
+ * **You probably don't need this option.** Think about other solutions to your problem. See the demos for the tips.
166
165
  *
167
166
  * **Heavy usage may significantly slow down build time.** Limit selectors to specific files to improve performance.
168
167
  *
@@ -202,8 +201,7 @@ interface SvgLoaderOptions {
202
201
  *
203
202
  * Can be a list of selectors or selectors-per-files specifiers.
204
203
  *
205
- * **You probably don't need this option.** Think of other ways to solve your problem. "Recipes" section
206
- * in the demos may help you.
204
+ * **You probably don't need this option.** Think about other solutions to your problem. See the demos for the tips.
207
205
  *
208
206
  * **Heavy usage may significantly slow down build time.** Limit selectors to specific files to improve performance.
209
207
  *
package/index.d.ts CHANGED
@@ -161,8 +161,7 @@ interface SvgLoaderOptions {
161
161
  *
162
162
  * Can be a list of selectors or selectors-per-files specifiers.
163
163
  *
164
- * **You probably don't need this option.** Think of other ways to solve your problem. "Recipes" section
165
- * in the demos may help you.
164
+ * **You probably don't need this option.** Think about other solutions to your problem. See the demos for the tips.
166
165
  *
167
166
  * **Heavy usage may significantly slow down build time.** Limit selectors to specific files to improve performance.
168
167
  *
@@ -202,8 +201,7 @@ interface SvgLoaderOptions {
202
201
  *
203
202
  * Can be a list of selectors or selectors-per-files specifiers.
204
203
  *
205
- * **You probably don't need this option.** Think of other ways to solve your problem. "Recipes" section
206
- * in the demos may help you.
204
+ * **You probably don't need this option.** Think about other solutions to your problem. See the demos for the tips.
207
205
  *
208
206
  * **Heavy usage may significantly slow down build time.** Limit selectors to specific files to improve performance.
209
207
  *
package/index.js CHANGED
@@ -337,7 +337,6 @@ function viteAwesomeSvgLoader(options = {}) {
337
337
  let isLibraryMode = false;
338
338
  let root = "";
339
339
  let base = "";
340
- let oldViteRoot = "";
341
340
  const replaceColorsList = options.setCurrentColorList || mergedOptions.replaceColorsList;
342
341
  const replacementsWithFiles = [];
343
342
  const filesWithCurrentColor = [];
@@ -379,7 +378,6 @@ function viteAwesomeSvgLoader(options = {}) {
379
378
  isLibraryMode = !!config.build.lib;
380
379
  root = normalizeBaseDir(config.root);
381
380
  base = normalizeBaseDir(config.base);
382
- oldViteRoot = root[1] === ":" ? root.substring(2) : root;
383
381
  },
384
382
  configureServer(server) {
385
383
  var _a;
@@ -389,21 +387,6 @@ function viteAwesomeSvgLoader(options = {}) {
389
387
  }
390
388
  });
391
389
  },
392
- resolveId(source, importer) {
393
- if (source.indexOf(".svg") === -1) {
394
- return null;
395
- }
396
- if (source.startsWith(oldViteRoot)) {
397
- return root + source.substring(oldViteRoot.length);
398
- }
399
- if (!source.startsWith(".")) {
400
- return source;
401
- }
402
- if (!importer) {
403
- return null;
404
- }
405
- return import_path2.default.join(import_path2.default.dirname(importer), source);
406
- },
407
390
  load(id) {
408
391
  var _a, _b;
409
392
  const ext = ".svg";
package/index.mjs CHANGED
@@ -304,7 +304,6 @@ function viteAwesomeSvgLoader(options = {}) {
304
304
  let isLibraryMode = false;
305
305
  let root = "";
306
306
  let base = "";
307
- let oldViteRoot = "";
308
307
  const replaceColorsList = options.setCurrentColorList || mergedOptions.replaceColorsList;
309
308
  const replacementsWithFiles = [];
310
309
  const filesWithCurrentColor = [];
@@ -346,7 +345,6 @@ function viteAwesomeSvgLoader(options = {}) {
346
345
  isLibraryMode = !!config.build.lib;
347
346
  root = normalizeBaseDir(config.root);
348
347
  base = normalizeBaseDir(config.base);
349
- oldViteRoot = root[1] === ":" ? root.substring(2) : root;
350
348
  },
351
349
  configureServer(server) {
352
350
  var _a;
@@ -356,21 +354,6 @@ function viteAwesomeSvgLoader(options = {}) {
356
354
  }
357
355
  });
358
356
  },
359
- resolveId(source, importer) {
360
- if (source.indexOf(".svg") === -1) {
361
- return null;
362
- }
363
- if (source.startsWith(oldViteRoot)) {
364
- return root + source.substring(oldViteRoot.length);
365
- }
366
- if (!source.startsWith(".")) {
367
- return source;
368
- }
369
- if (!importer) {
370
- return null;
371
- }
372
- return path2.join(path2.dirname(importer), source);
373
- },
374
357
  load(id) {
375
358
  var _a, _b;
376
359
  const ext = ".svg";
package/package.json CHANGED
@@ -5,6 +5,10 @@
5
5
  "vite",
6
6
  "svg",
7
7
  "loader",
8
+ "import",
9
+ "image",
10
+ "icon",
11
+ "plugin",
8
12
  "vite-svg",
9
13
  "vite-loader",
10
14
  "vite-plugin",
@@ -15,11 +19,7 @@
15
19
  "sprite-sheet",
16
20
  "svg-sprite",
17
21
  "sprites",
18
- "svg-sprites",
19
- "spritesheet",
20
22
  "sprite-sheets",
21
- "svg-spritesheets",
22
- "svg-sprite-sheets",
23
23
  "preserve-line-width",
24
24
  "preserve-stroke-width",
25
25
  "currentColor",
@@ -27,7 +27,7 @@
27
27
  "vite-awesome-svg-loader",
28
28
  "svgo"
29
29
  ],
30
- "version": "3.0.1",
30
+ "version": "3.0.3",
31
31
  "homepage": "https://matafokka.github.io/vite-awesome-svg-loader",
32
32
  "repository": "https://github.com/matafokka/vite-awesome-svg-loader",
33
33
  "license": "LGPL-2.1-or-later",