jeasx 2.9.1 → 2.10.0
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/build.js +3 -16
- package/package.json +2 -2
package/build.js
CHANGED
|
@@ -5,26 +5,13 @@ import env from "./env.js";
|
|
|
5
5
|
|
|
6
6
|
env();
|
|
7
7
|
|
|
8
|
-
process.env.BUILD_TIME ??= Date.now().toString(36);
|
|
9
|
-
|
|
10
8
|
const CWD = process.cwd();
|
|
11
9
|
const CONFIG = (await import(`file://${join(CWD, "jeasx.config.js")}`)).default;
|
|
12
10
|
const NODE_ENV_IS_DEVELOPMENT = process.env.NODE_ENV === "development";
|
|
13
11
|
|
|
14
|
-
const BROWSER_PUBLIC_ENV = Object.keys(process.env)
|
|
15
|
-
.filter((key) => key.startsWith("BROWSER_PUBLIC_"))
|
|
16
|
-
.reduce(
|
|
17
|
-
(env, key) => {
|
|
18
|
-
env[`process.env.${key}`] = `"${process.env[key]}"`;
|
|
19
|
-
return env;
|
|
20
|
-
},
|
|
21
|
-
Object({ "process.env.BROWSER_PUBLIC_BUILD_TIME": `"${process.env.BUILD_TIME}"` }),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
12
|
/** @type esbuild.BuildOptions */
|
|
25
13
|
const SERVER_OPTIONS = {
|
|
26
14
|
entryPoints: ["src/**/[*].*"],
|
|
27
|
-
define: { "process.env.BUILD_TIME": `"${process.env.BUILD_TIME}"` },
|
|
28
15
|
minify: !NODE_ENV_IS_DEVELOPMENT,
|
|
29
16
|
logLevel: "info",
|
|
30
17
|
color: true,
|
|
@@ -32,8 +19,8 @@ const SERVER_OPTIONS = {
|
|
|
32
19
|
outdir: "dist",
|
|
33
20
|
publicPath: "/",
|
|
34
21
|
assetNames: "[dir]/[name]-[hash]",
|
|
35
|
-
platform: "neutral",
|
|
36
22
|
format: "esm",
|
|
23
|
+
platform: "neutral",
|
|
37
24
|
packages: "external",
|
|
38
25
|
...CONFIG.ESBUILD_SERVER_OPTIONS?.(),
|
|
39
26
|
};
|
|
@@ -41,7 +28,6 @@ const SERVER_OPTIONS = {
|
|
|
41
28
|
/** @type esbuild.BuildOptions */
|
|
42
29
|
const BROWSER_OPTIONS = {
|
|
43
30
|
entryPoints: ["src/**/index.*"],
|
|
44
|
-
define: BROWSER_PUBLIC_ENV,
|
|
45
31
|
minify: !NODE_ENV_IS_DEVELOPMENT,
|
|
46
32
|
logLevel: "info",
|
|
47
33
|
color: true,
|
|
@@ -49,8 +35,9 @@ const BROWSER_OPTIONS = {
|
|
|
49
35
|
outdir: "dist",
|
|
50
36
|
publicPath: "/",
|
|
51
37
|
assetNames: "[dir]/[name]-[hash]",
|
|
52
|
-
platform: "browser",
|
|
53
38
|
format: "esm",
|
|
39
|
+
platform: "browser",
|
|
40
|
+
packages: "bundle",
|
|
54
41
|
...CONFIG.ESBUILD_BROWSER_OPTIONS?.(),
|
|
55
42
|
};
|
|
56
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jeasx",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Jeasx - the ease of JSX with the power of SSR",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"async",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@fastify/send": "4.1.0",
|
|
33
33
|
"@types/node": "26.1.2",
|
|
34
34
|
"esbuild": "0.28.1",
|
|
35
|
-
"fastify": "5.11.
|
|
35
|
+
"fastify": "5.11.2",
|
|
36
36
|
"jsx-async-runtime": "2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"allowScripts": {
|