rebuildjs 0.3.0 → 0.3.1
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/app/index.js +7 -2
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/server/index.js +23 -23
package/app/index.js
CHANGED
|
@@ -29,8 +29,13 @@ export const [
|
|
|
29
29
|
dist_path$_,
|
|
30
30
|
dist_path_,
|
|
31
31
|
dist_path__set,
|
|
32
|
-
] =
|
|
33
|
-
|
|
32
|
+
] = be_sig_triple_((ctx, dist_path$)=>
|
|
33
|
+
dist_path$.custom
|
|
34
|
+
? dist_path$._
|
|
35
|
+
: join(cwd_(ctx), 'dist'),
|
|
36
|
+
async dist_path$=>{
|
|
37
|
+
if (dist_path$._ != join(cwd_(ctx), 'dist')) dist_path$.custom = 1
|
|
38
|
+
},
|
|
34
39
|
app_ctx__be_config)
|
|
35
40
|
export const [
|
|
36
41
|
public_path$_,
|
package/build/index.js
CHANGED
|
@@ -37,7 +37,6 @@ export async function server__build(config = {}) {
|
|
|
37
37
|
entryNames: '[name]-[hash]',
|
|
38
38
|
assetNames: '[name]-[hash]',
|
|
39
39
|
bundle: true,
|
|
40
|
-
external,
|
|
41
40
|
target: 'es2020',
|
|
42
41
|
treeShaking: true,
|
|
43
42
|
minify: is_prod_(app_ctx),
|
|
@@ -48,6 +47,7 @@ export async function server__build(config = {}) {
|
|
|
48
47
|
absWorkingDir: cwd_(app_ctx),
|
|
49
48
|
metafile: true,
|
|
50
49
|
outdir: server_path_(app_ctx),
|
|
50
|
+
external,
|
|
51
51
|
plugins,
|
|
52
52
|
}
|
|
53
53
|
if (is_prod_(app_ctx)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rebuildjs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Reactive esbuild...simple hackable alternative to vite for Multi Page Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reactive",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"./package.json": "./package.json"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"ctx-core": "^4.
|
|
48
|
+
"ctx-core": "^4.15.0",
|
|
49
49
|
"elysia": "^0.7.30",
|
|
50
50
|
"fdir": "^6.1.1",
|
|
51
51
|
"picomatch": "^3.0.1"
|
package/server/index.js
CHANGED
|
@@ -9,48 +9,48 @@ export const [
|
|
|
9
9
|
server__metafile__set
|
|
10
10
|
] = be_sig_triple_(()=>
|
|
11
11
|
undefined,
|
|
12
|
-
|
|
12
|
+
{ ...middleware_ctx__be_config, id: 'server__metafile' })
|
|
13
13
|
export const [
|
|
14
14
|
server__input_path$_,
|
|
15
15
|
server__input_path_,
|
|
16
16
|
server__input_path__set
|
|
17
17
|
] = be_sig_triple_(()=>
|
|
18
18
|
undefined,
|
|
19
|
-
|
|
19
|
+
{ ...middleware_ctx__be_config, id: 'server__input_path' })
|
|
20
20
|
export const [
|
|
21
21
|
server__output_path$_,
|
|
22
22
|
server__output_path_
|
|
23
23
|
] = be_memo_pair_(ctx=>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
nullish__none_(tup(server__metafile_(ctx), server__input_path_(ctx)),
|
|
25
|
+
(server__metafile, input_path)=>{
|
|
26
|
+
const { outputs } = server__metafile
|
|
27
|
+
for (const output_path in outputs) {
|
|
28
|
+
const output = outputs[output_path]
|
|
29
|
+
if (output.entryPoint === input_path) return output_path
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
{ ...middleware_ctx__be_config, id: 'server__output_path' })
|
|
33
33
|
export const [
|
|
34
34
|
server__output$_,
|
|
35
35
|
server__output_
|
|
36
36
|
] = be_memo_pair_(ctx=>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
nullish__none_(tup(server__metafile_(ctx), server__output_path_(ctx)),
|
|
38
|
+
(server__metafile, output_path)=>
|
|
39
|
+
server__metafile.outputs[output_path]),
|
|
40
|
+
{ ...middleware_ctx__be_config, id: 'server__output' })
|
|
41
41
|
export const [
|
|
42
42
|
server__cssBundle$_,
|
|
43
43
|
server__cssBundle_
|
|
44
44
|
] = be_memo_pair_(ctx=>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
nullish__none_([server__output_(ctx)?.cssBundle],
|
|
46
|
+
cssBundle=>
|
|
47
|
+
join(cwd_(ctx), cssBundle)),
|
|
48
|
+
{ ...middleware_ctx__be_config, id: 'server__cssBundle', })
|
|
49
49
|
export const [
|
|
50
50
|
server__css$_,
|
|
51
51
|
server__css_
|
|
52
52
|
] = be_memo_pair_(ctx=>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
nullish__none_([server__cssBundle_(ctx)],
|
|
54
|
+
cssBundle=>
|
|
55
|
+
cssBundle.replace(server_path_(ctx), '')),
|
|
56
|
+
{ ...middleware_ctx__be_config, id: 'server__css' })
|