vite-awesome-svg-loader 3.0.2 → 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.js +0 -17
- package/index.mjs +0 -17
- package/package.json +1 -1
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
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"vite-awesome-svg-loader",
|
|
28
28
|
"svgo"
|
|
29
29
|
],
|
|
30
|
-
"version": "3.0.
|
|
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",
|