jeasx 2.9.0 → 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 +3 -3
package/build.js
CHANGED
|
@@ -8,32 +8,19 @@ env();
|
|
|
8
8
|
const CWD = process.cwd();
|
|
9
9
|
const CONFIG = (await import(`file://${join(CWD, "jeasx.config.js")}`)).default;
|
|
10
10
|
const NODE_ENV_IS_DEVELOPMENT = process.env.NODE_ENV === "development";
|
|
11
|
-
const BUILD_TIME = `"${process.env.BUILD_TIME || Date.now().toString(36)}"`;
|
|
12
|
-
|
|
13
|
-
const BROWSER_PUBLIC_ENV = Object.keys(process.env)
|
|
14
|
-
.filter((key) => key.startsWith("BROWSER_PUBLIC_"))
|
|
15
|
-
.reduce(
|
|
16
|
-
(env, key) => {
|
|
17
|
-
env[`process.env.${key}`] = `"${process.env[key]}"`;
|
|
18
|
-
return env;
|
|
19
|
-
},
|
|
20
|
-
Object({ "process.env.BROWSER_PUBLIC_BUILD_TIME": BUILD_TIME }),
|
|
21
|
-
);
|
|
22
11
|
|
|
23
12
|
/** @type esbuild.BuildOptions */
|
|
24
13
|
const SERVER_OPTIONS = {
|
|
25
14
|
entryPoints: ["src/**/[*].*"],
|
|
26
|
-
define: { "process.env.BUILD_TIME": BUILD_TIME },
|
|
27
15
|
minify: !NODE_ENV_IS_DEVELOPMENT,
|
|
28
16
|
logLevel: "info",
|
|
29
17
|
color: true,
|
|
30
18
|
bundle: true,
|
|
31
|
-
metafile: true,
|
|
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",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@fastify/send": "4.1.0",
|
|
33
|
-
"@types/node": "26.1.
|
|
33
|
+
"@types/node": "26.1.2",
|
|
34
34
|
"esbuild": "0.28.1",
|
|
35
|
-
"fastify": "5.
|
|
35
|
+
"fastify": "5.11.2",
|
|
36
36
|
"jsx-async-runtime": "2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"allowScripts": {
|