aleman 1.0.8 → 1.0.10

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.
Files changed (2) hide show
  1. package/menu/menu.js +4 -14
  2. package/package.json +1 -1
package/menu/menu.js CHANGED
@@ -10,21 +10,10 @@ export const createMenu = async () => {
10
10
 
11
11
  async function createLink() {
12
12
  const style = document.createElement('style');
13
- const content = await import('../style.css', {
14
- with: {
15
- type: 'css',
16
- },
17
- });
18
-
19
- for (const rule of content.default.cssRules) {
20
- style.innerHTML += rule.cssText;
21
- }
22
-
23
- const styleFetch = await fetch('../style.css');
24
- const text = await styleFetch.text();
25
-
26
- style.innerHTML = text;
13
+ const stylePath = new URL('../style.css', import.meta.url).pathname;
14
+ const styleFetch = await fetch(stylePath);
27
15
 
16
+ style.innerHTML = await styleFetch.text();
28
17
  document.head.appendChild(style);
29
18
  }
30
19
 
@@ -53,3 +42,4 @@ function createMap() {
53
42
  `;
54
43
  document.body.append(script);
55
44
  }
45
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",