@sealcode/sealgen 0.15.50 → 0.15.52
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/lib/builder.js +13 -4
- package/package.json +1 -1
- package/src/builder.ts +12 -3
package/lib/builder.js
CHANGED
|
@@ -39,9 +39,17 @@ class CSSBuilder extends Builder {
|
|
|
39
39
|
async getBuildContext() {
|
|
40
40
|
if (!this.context_promise) {
|
|
41
41
|
const loader = Object.fromEntries(
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
[
|
|
43
|
+
"png",
|
|
44
|
+
"svg",
|
|
45
|
+
"jpg",
|
|
46
|
+
"gif",
|
|
47
|
+
"jpeg",
|
|
48
|
+
"otf",
|
|
49
|
+
"ttf",
|
|
50
|
+
"woff",
|
|
51
|
+
"woff2"
|
|
52
|
+
].map((ext) => ["." + ext, "file"])
|
|
45
53
|
);
|
|
46
54
|
const context_promise = context({
|
|
47
55
|
entryPoints: ["./src/main.css"],
|
|
@@ -50,7 +58,8 @@ class CSSBuilder extends Builder {
|
|
|
50
58
|
outdir: "./public/dist",
|
|
51
59
|
logLevel: "info",
|
|
52
60
|
// plugins: [sassPlugin()],
|
|
53
|
-
loader
|
|
61
|
+
loader,
|
|
62
|
+
minify: true
|
|
54
63
|
});
|
|
55
64
|
this.context_promise = context_promise;
|
|
56
65
|
return context_promise;
|
package/package.json
CHANGED
package/src/builder.ts
CHANGED
|
@@ -54,9 +54,17 @@ export class CSSBuilder extends Builder {
|
|
|
54
54
|
async getBuildContext(): Promise<BuildContext> {
|
|
55
55
|
if (!this.context_promise) {
|
|
56
56
|
const loader = Object.fromEntries(
|
|
57
|
-
(<const>[
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
(<const>[
|
|
58
|
+
"png",
|
|
59
|
+
"svg",
|
|
60
|
+
"jpg",
|
|
61
|
+
"gif",
|
|
62
|
+
"jpeg",
|
|
63
|
+
"otf",
|
|
64
|
+
"ttf",
|
|
65
|
+
"woff",
|
|
66
|
+
"woff2",
|
|
67
|
+
]).map((ext) => <const>["." + ext, "file"])
|
|
60
68
|
);
|
|
61
69
|
const context_promise = context({
|
|
62
70
|
entryPoints: ["./src/main.css"],
|
|
@@ -66,6 +74,7 @@ export class CSSBuilder extends Builder {
|
|
|
66
74
|
logLevel: "info",
|
|
67
75
|
// plugins: [sassPlugin()],
|
|
68
76
|
loader,
|
|
77
|
+
minify: true,
|
|
69
78
|
});
|
|
70
79
|
this.context_promise = context_promise;
|
|
71
80
|
return context_promise;
|