@modern-js/node-bundle-require 2.41.0 → 2.42.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/dist/types/bundle.d.ts +28 -28
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -4
package/dist/types/bundle.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { Plugin, BuildOptions } from 'esbuild';
|
|
2
2
|
export declare const EXTERNAL_REGEXP: RegExp;
|
|
3
3
|
export interface Options {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The `require` function that is used to load the output file
|
|
6
|
+
* Default to the global `require` function
|
|
7
|
+
* This function can be asynchronous, i.e. returns a Promise
|
|
8
|
+
*/
|
|
9
|
+
require?: (outfile: string) => any;
|
|
10
|
+
/**
|
|
11
|
+
* esbuild options
|
|
12
|
+
*/
|
|
13
|
+
esbuildOptions?: BuildOptions;
|
|
14
|
+
/**
|
|
15
|
+
* esbuild plugin
|
|
16
|
+
*/
|
|
17
|
+
esbuildPlugins?: Plugin[];
|
|
18
|
+
/**
|
|
19
|
+
* Get the path to the output file
|
|
20
|
+
* By default we simply replace the extension with `.bundled.cjs`
|
|
21
|
+
*/
|
|
22
|
+
getOutputFile?: (filepath: string) => Promise<string>;
|
|
23
|
+
/**
|
|
24
|
+
* auto clear bundle file
|
|
25
|
+
*/
|
|
26
|
+
autoClear?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to enable watch mode
|
|
29
|
+
*/
|
|
30
|
+
watch?: boolean;
|
|
31
31
|
}
|
|
32
32
|
export declare const defaultGetOutputFile: (filepath: string) => Promise<string>;
|
|
33
|
-
export declare function bundle(filepath: string, options?: Options): Promise<string>;
|
|
33
|
+
export declare function bundle(filepath: string, options?: Options): Promise<string>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import type { Options } from './bundle';
|
|
|
2
2
|
import { bundle, defaultGetOutputFile } from './bundle';
|
|
3
3
|
export { bundle, defaultGetOutputFile };
|
|
4
4
|
export type { Options };
|
|
5
|
-
export declare function bundleRequire(filepath: string, options?: Options): Promise<any>;
|
|
5
|
+
export declare function bundleRequire(filepath: string, options?: Options): Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/node-bundle-require",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.1",
|
|
4
4
|
"description": "A Progressive React Framework for modern web development.",
|
|
5
5
|
"homepage": "https://modernjs.dev",
|
|
6
6
|
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"esbuild": "0.17.19",
|
|
49
49
|
"@swc/helpers": "0.5.3",
|
|
50
|
-
"@modern-js/utils": "2.
|
|
50
|
+
"@modern-js/utils": "2.42.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/jest": "^29",
|
|
54
54
|
"@types/node": "^14",
|
|
55
55
|
"jest": "^29",
|
|
56
56
|
"typescript": "^5",
|
|
57
|
-
"@scripts/build": "2.
|
|
58
|
-
"@scripts/jest-config": "2.
|
|
57
|
+
"@scripts/build": "2.42.1",
|
|
58
|
+
"@scripts/jest-config": "2.42.1"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"publishConfig": {
|