@unocss/preset-web-fonts 0.31.17 → 0.32.7

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/dist/index.cjs CHANGED
@@ -62,9 +62,8 @@ const preset = (options = {}) => {
62
62
  if (inlineImports) {
63
63
  if (!importCache[url]) {
64
64
  try {
65
- const { default: axios } = await import('axios');
66
- const { data } = await axios.get(url, { headers: {} });
67
- importCache[url] = data;
65
+ const { $fetch } = await import('ohmyfetch');
66
+ importCache[url] = await $fetch(url, { headers: {} });
68
67
  } catch (e) {
69
68
  console.error("Failed to fetch web fonts");
70
69
  console.error(e);
package/dist/index.mjs CHANGED
@@ -58,9 +58,8 @@ const preset = (options = {}) => {
58
58
  if (inlineImports) {
59
59
  if (!importCache[url]) {
60
60
  try {
61
- const { default: axios } = await import('axios');
62
- const { data } = await axios.get(url, { headers: {} });
63
- importCache[url] = data;
61
+ const { $fetch } = await import('ohmyfetch');
62
+ importCache[url] = await $fetch(url, { headers: {} });
64
63
  } catch (e) {
65
64
  console.error("Failed to fetch web fonts");
66
65
  console.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-web-fonts",
3
- "version": "0.31.17",
3
+ "version": "0.32.7",
4
4
  "description": "Web Fonts support for Uno CSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -42,8 +42,8 @@
42
42
  ],
43
43
  "sideEffects": false,
44
44
  "dependencies": {
45
- "@unocss/core": "0.31.17",
46
- "axios": "^0.26.1"
45
+ "@unocss/core": "0.32.7",
46
+ "ohmyfetch": "^0.4.15"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "unbuild",