xshell 1.0.128 → 1.0.129
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/builder.d.ts +3 -1
- package/builder.js +3 -1
- package/package.json +1 -1
package/builder.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { Lock } from './utils.js';
|
|
|
3
3
|
export interface BundlerOptions {
|
|
4
4
|
source_map?: boolean;
|
|
5
5
|
production?: boolean;
|
|
6
|
+
external_dayjs?: boolean;
|
|
6
7
|
externals?: Record<string, string>;
|
|
7
8
|
sass?: typeof import('sass');
|
|
8
9
|
dynamic_import?: boolean;
|
|
@@ -31,6 +32,7 @@ export declare class Bundler {
|
|
|
31
32
|
- options?: 打包配置, 按常用顺序排列
|
|
32
33
|
- source_map?: `true` 启用源码映射 .map 文件
|
|
33
34
|
- globals?: 全局变量定义
|
|
35
|
+
- external_dayjs?: `false` 配置 dayjs 为 external 来配合 antd 使用, 减小一点体积
|
|
34
36
|
- externals?: 配置外部模块
|
|
35
37
|
- commonjs2?: `false` 打包为 commonjs2 (.cjs) 的文件
|
|
36
38
|
- single_chunk?: `true` 输出为单个文件,将依赖也打包到其中,不要生成多个 chunk
|
|
@@ -42,7 +44,7 @@ export declare class Bundler {
|
|
|
42
44
|
- cache_version?: webpack cache version, 用于区分同一个 name 的不同版本
|
|
43
45
|
- production?: `true` webpack mode 设置为 'production'
|
|
44
46
|
- sass?: 传入 sass 实例避免 webpack 重复加载 .cjs 版本 */
|
|
45
|
-
constructor(name: string, target: 'web' | 'nodejs', fpd_root: string, fpd_out: string, fpdt_cache: string, entry: Record<string, string>, { source_map, globals, externals, commonjs2, single_chunk, dynamic_import, assets_stats, analyzer, dts, exclude_modules, cache_version, production, sass, }?: BundlerOptions);
|
|
47
|
+
constructor(name: string, target: 'web' | 'nodejs', fpd_root: string, fpd_out: string, fpdt_cache: string, entry: Record<string, string>, { source_map, globals, external_dayjs, externals, commonjs2, single_chunk, dynamic_import, assets_stats, analyzer, dts, exclude_modules, cache_version, production, sass, }?: BundlerOptions);
|
|
46
48
|
build(print?: boolean): Promise<void>;
|
|
47
49
|
close(): Promise<void>;
|
|
48
50
|
build_and_close(print?: boolean): Promise<void>;
|
package/builder.js
CHANGED
|
@@ -17,6 +17,7 @@ export class Bundler {
|
|
|
17
17
|
- options?: 打包配置, 按常用顺序排列
|
|
18
18
|
- source_map?: `true` 启用源码映射 .map 文件
|
|
19
19
|
- globals?: 全局变量定义
|
|
20
|
+
- external_dayjs?: `false` 配置 dayjs 为 external 来配合 antd 使用, 减小一点体积
|
|
20
21
|
- externals?: 配置外部模块
|
|
21
22
|
- commonjs2?: `false` 打包为 commonjs2 (.cjs) 的文件
|
|
22
23
|
- single_chunk?: `true` 输出为单个文件,将依赖也打包到其中,不要生成多个 chunk
|
|
@@ -28,7 +29,7 @@ export class Bundler {
|
|
|
28
29
|
- cache_version?: webpack cache version, 用于区分同一个 name 的不同版本
|
|
29
30
|
- production?: `true` webpack mode 设置为 'production'
|
|
30
31
|
- sass?: 传入 sass 实例避免 webpack 重复加载 .cjs 版本 */
|
|
31
|
-
constructor(name, target, fpd_root, fpd_out, fpdt_cache, entry, { source_map = true, globals, externals, commonjs2 = false, single_chunk = true, dynamic_import = true, assets_stats = true, analyzer = false, dts = false, exclude_modules, cache_version, production = true, sass, } = {}) {
|
|
32
|
+
constructor(name, target, fpd_root, fpd_out, fpdt_cache, entry, { source_map = true, globals, external_dayjs = false, externals, commonjs2 = false, single_chunk = true, dynamic_import = true, assets_stats = true, analyzer = false, dts = false, exclude_modules, cache_version, production = true, sass, } = {}) {
|
|
32
33
|
this.name = name;
|
|
33
34
|
this.analyzer = analyzer;
|
|
34
35
|
// let smp = new SpeedMeasurePlugin()
|
|
@@ -77,6 +78,7 @@ export class Bundler {
|
|
|
77
78
|
// 实际上 Terminal 直接暴露在了 window 上,而不是 window.Terminal.Terminal
|
|
78
79
|
xterm: 'window',
|
|
79
80
|
swiper: 'Swiper',
|
|
81
|
+
...external_dayjs ? { dayjs: 'dayjs' } : {},
|
|
80
82
|
antd: 'antd',
|
|
81
83
|
'@ant-design/icons': 'icons',
|
|
82
84
|
'@ant-design/plots': 'Plots',
|