@evjs/bundler-utoopack 0.1.1 → 0.1.3
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/README.md +6 -3
- package/esm/index.d.ts +2 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/plugin-helper.d.ts +3 -1
- package/esm/plugin-helper.d.ts.map +1 -1
- package/esm/plugin-helper.js +2 -0
- package/esm/plugin-helper.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ The `utoopack()` helper wraps your plugin hooks for type-safe configuration muta
|
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
import { defineConfig } from "@evjs/ev";
|
|
30
|
-
import { utoopack } from "@evjs/bundler-utoopack";
|
|
30
|
+
import { merge, utoopack } from "@evjs/bundler-utoopack";
|
|
31
31
|
|
|
32
32
|
export default defineConfig({
|
|
33
33
|
plugins: [
|
|
@@ -37,8 +37,11 @@ export default defineConfig({
|
|
|
37
37
|
return {
|
|
38
38
|
bundlerConfig: utoopack((config) => {
|
|
39
39
|
// config is typed as ConfigComplete from @utoo/pack
|
|
40
|
-
config
|
|
41
|
-
|
|
40
|
+
merge(config, {
|
|
41
|
+
define: {
|
|
42
|
+
__MY_VAR__: JSON.stringify("value"),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
42
45
|
}),
|
|
43
46
|
};
|
|
44
47
|
},
|
package/esm/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
* for zero-config server function handling.
|
|
6
6
|
*/
|
|
7
7
|
export { utoopackAdapter } from "./adapter/index.js";
|
|
8
|
-
export {
|
|
8
|
+
export type { ConfigPatch } from "./plugin-helper.js";
|
|
9
|
+
export { merge, utoopack } from "./plugin-helper.js";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
package/esm/plugin-helper.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type EvBundlerCtx, merge } from "@evjs/ev";
|
|
2
2
|
import type { ConfigComplete } from "@utoo/pack";
|
|
3
|
+
export type { ConfigPatch } from "@evjs/ev";
|
|
3
4
|
/**
|
|
4
5
|
* Typed wrapper for utoopack configuration in plugin bundler hooks.
|
|
5
6
|
*
|
|
@@ -23,4 +24,5 @@ import type { ConfigComplete } from "@utoo/pack";
|
|
|
23
24
|
* ```
|
|
24
25
|
*/
|
|
25
26
|
export declare function utoopack<T = unknown>(fn: (config: ConfigComplete, ctx: EvBundlerCtx<ConfigComplete>) => void): (config: T, ctx: EvBundlerCtx<T>) => void;
|
|
27
|
+
export { merge };
|
|
26
28
|
//# sourceMappingURL=plugin-helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-helper.d.ts","sourceRoot":"","sources":["../src/plugin-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin-helper.d.ts","sourceRoot":"","sources":["../src/plugin-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAClC,EAAE,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,YAAY,CAAC,cAAc,CAAC,KAAK,IAAI,GACtE,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAS3C;AACD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/esm/plugin-helper.js
CHANGED
package/esm/plugin-helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-helper.js","sourceRoot":"","sources":["../src/plugin-helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-helper.js","sourceRoot":"","sources":["../src/plugin-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,QAAQ,CACtB,EAAuE;IAEvE,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACrB,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,KAAK,UAAU,EAAE,CAAC;YAC5C,EAAE,CACA,MAAmC,EACnC,GAA8C,CAC/C,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AACD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|