rebuildjs 0.11.2 → 0.12.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.
@@ -0,0 +1 @@
1
+ export declare function asset_path_(mod_promise:Promise<{ default: string }>):Promise<string>
package/asset/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export async function asset_path_(mod_promise) {
2
+ return (await mod_promise.then(mod=>mod.default)).replace(/^\.\//, '/')
3
+ }
package/build/index.js CHANGED
@@ -85,7 +85,7 @@ export async function server__build(config) {
85
85
  entryNames: '[name]-[hash]',
86
86
  assetNames: '[name]-[hash]',
87
87
  bundle: true,
88
- target: 'es2020',
88
+ target: 'es2022',
89
89
  treeShaking: true,
90
90
  minify: is_prod_(app_ctx),
91
91
  sourcemap: 'external',
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from 'ctx-core/be'
2
2
  export * from 'ctx-core/rmemo'
3
3
  export * from './app/index.js'
4
+ export * from './asset/index.js'
4
5
  export * from './browser/index.js'
5
6
  export * from './build/index.js'
6
7
  export * from './ctx/index.js'
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from 'ctx-core/be'
2
2
  export * from 'ctx-core/rmemo'
3
3
  export * from './app/index.js'
4
+ export * from './asset/index.js'
4
5
  export * from './browser/index.js'
5
6
  export * from './build/index.js'
6
7
  export * from './ctx/index.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuildjs",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Reactive esbuild...simple hackable alternative to vite for Multi Page Apps",
5
5
  "keywords": [
6
6
  "reactive",
@@ -26,17 +26,19 @@
26
26
  "*.d.ts",
27
27
  "*.js",
28
28
  "*.json",
29
- "./app",
30
- "./browser",
31
- "./build",
32
- "./ctx",
33
- "./middleware",
34
- "./server"
29
+ "app",
30
+ "asset",
31
+ "browser",
32
+ "build",
33
+ "ctx",
34
+ "middleware",
35
+ "server"
35
36
  ],
36
37
  "types": "./index.d.ts",
37
38
  "exports": {
38
39
  ".": "./index.js",
39
40
  "./app": "./app/index.js",
41
+ "./asset": "./asset/index.js",
40
42
  "./browser": "./browser/index.js",
41
43
  "./build": "./build/index.js",
42
44
  "./ctx": "./ctx/index.js",
package/server/index.js CHANGED
@@ -55,5 +55,5 @@ export const [
55
55
  ] = be_memo_pair_(ctx=>
56
56
  nullish__none_([server__cssBundle_(ctx)],
57
57
  cssBundle=>
58
- relative(server_path_(ctx), cssBundle)),
58
+ join('/', relative(server_path_(ctx), cssBundle))),
59
59
  { ...middleware_ctx__be_config, id: 'server__css' })