primate 0.22.2 → 0.22.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primate",
3
- "version": "0.22.2",
3
+ "version": "0.22.3",
4
4
  "description": "Expressive, minimal and extensible web framework",
5
5
  "homepage": "https://primatejs.com",
6
6
  "bugs": "https://github.com/primatejs/primate/issues",
@@ -31,19 +31,19 @@ const post = async app => {
31
31
  }
32
32
 
33
33
  if (await path.static.exists) {
34
- // copy static files to build/static
34
+ // copy static files to build/client/static
35
35
  await app.stage(path.static, new Path(location.client, location.static));
36
36
 
37
37
  // publish JavaScript and CSS files
38
38
  const imports = await Path.collect(path.static, /\.(?:js|css)$/u);
39
39
  await Promise.all(imports.map(async file => {
40
40
  const code = await file.text();
41
- const src = `/${file.name}`;
41
+ const src = file.debase(path.static);
42
42
  const type = file.extension === ".css" ? "style" : "module";
43
43
  // already copied in `app.stage`
44
44
  await app.publish({src, code, type, copy: false});
45
45
  type === "style" && app.export({type,
46
- code: `import "../${location.client}/${location.static}${src}";`});
46
+ code: `import "./${location.static}${src}";`});
47
47
  }));
48
48
  }
49
49