@akanjs/devkit 0.0.148 → 0.0.150
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/cjs/src/builder.js +4 -2
- package/esm/src/builder.js +4 -2
- package/package.json +1 -1
package/cjs/src/builder.js
CHANGED
|
@@ -34,6 +34,8 @@ var esbuild = __toESM(require("esbuild"));
|
|
|
34
34
|
var import_esbuild_plugin_d = require("esbuild-plugin-d.ts");
|
|
35
35
|
var import_fs = __toESM(require("fs"));
|
|
36
36
|
var import_extractDeps = require("./extractDeps");
|
|
37
|
+
const assetExtensions = [".css", ".md", ".js", ".png", ".ico", ".svg", ".json", ".template"];
|
|
38
|
+
const assetLoader = Object.fromEntries(assetExtensions.map((ext) => [ext, "copy"]));
|
|
37
39
|
class Builder {
|
|
38
40
|
#executor;
|
|
39
41
|
#distExecutor;
|
|
@@ -58,7 +60,7 @@ class Builder {
|
|
|
58
60
|
format,
|
|
59
61
|
outdir: `${this.#distExecutor.cwdPath}/${format}`,
|
|
60
62
|
logLevel: "error",
|
|
61
|
-
loader:
|
|
63
|
+
loader: assetLoader
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
66
|
#getAssetBuildOptions() {
|
|
@@ -72,7 +74,7 @@ class Builder {
|
|
|
72
74
|
],
|
|
73
75
|
outdir: this.#distExecutor.cwdPath,
|
|
74
76
|
logLevel: "error",
|
|
75
|
-
loader:
|
|
77
|
+
loader: assetLoader
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
80
|
async build(options = {}) {
|
package/esm/src/builder.js
CHANGED
|
@@ -2,6 +2,8 @@ import * as esbuild from "esbuild";
|
|
|
2
2
|
import { dtsPlugin } from "esbuild-plugin-d.ts";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import { extractDependencies } from "./extractDeps";
|
|
5
|
+
const assetExtensions = [".css", ".md", ".js", ".png", ".ico", ".svg", ".json", ".template"];
|
|
6
|
+
const assetLoader = Object.fromEntries(assetExtensions.map((ext) => [ext, "copy"]));
|
|
5
7
|
class Builder {
|
|
6
8
|
#executor;
|
|
7
9
|
#distExecutor;
|
|
@@ -26,7 +28,7 @@ class Builder {
|
|
|
26
28
|
format,
|
|
27
29
|
outdir: `${this.#distExecutor.cwdPath}/${format}`,
|
|
28
30
|
logLevel: "error",
|
|
29
|
-
loader:
|
|
31
|
+
loader: assetLoader
|
|
30
32
|
};
|
|
31
33
|
}
|
|
32
34
|
#getAssetBuildOptions() {
|
|
@@ -40,7 +42,7 @@ class Builder {
|
|
|
40
42
|
],
|
|
41
43
|
outdir: this.#distExecutor.cwdPath,
|
|
42
44
|
logLevel: "error",
|
|
43
|
-
loader:
|
|
45
|
+
loader: assetLoader
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
async build(options = {}) {
|