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 +1 -1
- package/src/hooks/publish.js +3 -3
package/package.json
CHANGED
package/src/hooks/publish.js
CHANGED
|
@@ -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 =
|
|
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 "
|
|
46
|
+
code: `import "./${location.static}${src}";`});
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
49
|
|