@visulima/packem 1.0.0-alpha.72 → 1.0.0-alpha.73
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/CHANGELOG.md +6 -0
- package/dist/cli.mjs +62 -62
- package/dist/config.d.cts +3 -3
- package/dist/config.d.mts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/create-bundler.cjs +59 -59
- package/dist/create-bundler.d.cts +3 -3
- package/dist/create-bundler.d.mts +3 -3
- package/dist/create-bundler.d.ts +3 -3
- package/dist/create-bundler.mjs +69 -69
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.cts +2 -2
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.mts +2 -2
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +2 -2
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.cts +2 -2
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.mts +2 -2
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +2 -2
- package/dist/rollup/plugins/swc/swc-plugin.d.cts +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.d.mts +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.d.ts +1 -1
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.cts +2 -2
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.mts +2 -2
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +2 -2
- package/dist/shared/{packem.D8xT1G8q.d.ts → packem.CNJKwaxV.d.ts} +11 -8
- package/dist/shared/{packem.6LZ1Jtxj.d.mts → packem.CTtLbshh.d.mts} +11 -8
- package/dist/shared/{packem.iWQSRLv6.d.cts → packem.Co_fRK1H.d.cts} +11 -8
- package/dist/shared/{packem.Cvy5yEVh.d.cts → packem.CzGE8V_d.d.cts} +2 -2
- package/dist/shared/{packem.Cvy5yEVh.d.mts → packem.CzGE8V_d.d.mts} +2 -2
- package/dist/shared/{packem.Cvy5yEVh.d.ts → packem.CzGE8V_d.d.ts} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.Co_fRK1H.cjs';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.cjs';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.cjs';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.cjs';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsOxcTransformer: (id: string, code: string) => IsolatedDeclarationsResult;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CTtLbshh.mjs';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.mjs';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.mjs';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.mjs';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsOxcTransformer: (id: string, code: string) => IsolatedDeclarationsResult;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CNJKwaxV.js';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.js';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.js';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.js';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsOxcTransformer: (id: string, code: string) => IsolatedDeclarationsResult;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.Co_fRK1H.cjs';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.cjs';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.cjs';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.cjs';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsSwcTransformer: (id: string, code: string) => Promise<IsolatedDeclarationsResult>;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CTtLbshh.mjs';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.mjs';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.mjs';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.mjs';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsSwcTransformer: (id: string, code: string) => Promise<IsolatedDeclarationsResult>;
|
|
25
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
1
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CNJKwaxV.js';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -19,7 +19,7 @@ import '../../../shared/packem.Db-Z_7e-.js';
|
|
|
19
19
|
import 'esbuild';
|
|
20
20
|
import '../../../shared/packem.DvWhOdt5.js';
|
|
21
21
|
import 'sucrase';
|
|
22
|
-
import '../../../shared/packem.
|
|
22
|
+
import '../../../shared/packem.CzGE8V_d.js';
|
|
23
23
|
|
|
24
24
|
declare const isolatedDeclarationsSwcTransformer: (id: string, code: string) => Promise<IsolatedDeclarationsResult>;
|
|
25
25
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import { S as SwcPluginConfig } from '../../../shared/packem.
|
|
2
|
+
import { S as SwcPluginConfig } from '../../../shared/packem.CzGE8V_d.cjs';
|
|
3
3
|
import '@rollup/pluginutils';
|
|
4
4
|
|
|
5
5
|
declare const swcPlugin: ({ exclude, extensions, include, ...transformOptions }: SwcPluginConfig) => Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import { S as SwcPluginConfig } from '../../../shared/packem.
|
|
2
|
+
import { S as SwcPluginConfig } from '../../../shared/packem.CzGE8V_d.mjs';
|
|
3
3
|
import '@rollup/pluginutils';
|
|
4
4
|
|
|
5
5
|
declare const swcPlugin: ({ exclude, extensions, include, ...transformOptions }: SwcPluginConfig) => Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from 'rollup';
|
|
2
|
-
import { S as SwcPluginConfig } from '../../../shared/packem.
|
|
2
|
+
import { S as SwcPluginConfig } from '../../../shared/packem.CzGE8V_d.js';
|
|
3
3
|
import '@rollup/pluginutils';
|
|
4
4
|
|
|
5
5
|
declare const swcPlugin: ({ exclude, extensions, include, ...transformOptions }: SwcPluginConfig) => Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranspileOptions } from 'typescript';
|
|
2
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
2
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.Co_fRK1H.cjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -20,7 +20,7 @@ import '../../../shared/packem.Db-Z_7e-.cjs';
|
|
|
20
20
|
import 'esbuild';
|
|
21
21
|
import '../../../shared/packem.DvWhOdt5.cjs';
|
|
22
22
|
import 'sucrase';
|
|
23
|
-
import '../../../shared/packem.
|
|
23
|
+
import '../../../shared/packem.CzGE8V_d.cjs';
|
|
24
24
|
|
|
25
25
|
declare const isolatedDeclarationsTypescriptTransformer: (id: string, code: string, transformOptions?: TranspileOptions) => Promise<IsolatedDeclarationsResult>;
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranspileOptions } from 'typescript';
|
|
2
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
2
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CTtLbshh.mjs';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -20,7 +20,7 @@ import '../../../shared/packem.Db-Z_7e-.mjs';
|
|
|
20
20
|
import 'esbuild';
|
|
21
21
|
import '../../../shared/packem.DvWhOdt5.mjs';
|
|
22
22
|
import 'sucrase';
|
|
23
|
-
import '../../../shared/packem.
|
|
23
|
+
import '../../../shared/packem.CzGE8V_d.mjs';
|
|
24
24
|
|
|
25
25
|
declare const isolatedDeclarationsTypescriptTransformer: (id: string, code: string, transformOptions?: TranspileOptions) => Promise<IsolatedDeclarationsResult>;
|
|
26
26
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TranspileOptions } from 'typescript';
|
|
2
|
-
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.
|
|
2
|
+
import { I as IsolatedDeclarationsResult } from '../../../shared/packem.CNJKwaxV.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -20,7 +20,7 @@ import '../../../shared/packem.Db-Z_7e-.js';
|
|
|
20
20
|
import 'esbuild';
|
|
21
21
|
import '../../../shared/packem.DvWhOdt5.js';
|
|
22
22
|
import 'sucrase';
|
|
23
|
-
import '../../../shared/packem.
|
|
23
|
+
import '../../../shared/packem.CzGE8V_d.js';
|
|
24
24
|
|
|
25
25
|
declare const isolatedDeclarationsTypescriptTransformer: (id: string, code: string, transformOptions?: TranspileOptions) => Promise<IsolatedDeclarationsResult>;
|
|
26
26
|
|
|
@@ -16,7 +16,7 @@ import { NodePolyfillsOptions } from 'rollup-plugin-polyfill-node';
|
|
|
16
16
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
17
17
|
import { E as EsbuildPluginConfig, O as Options$1 } from './packem.Db-Z_7e-.js';
|
|
18
18
|
import { S as SucrasePluginConfig } from './packem.DvWhOdt5.js';
|
|
19
|
-
import { S as SwcPluginConfig } from './packem.
|
|
19
|
+
import { S as SwcPluginConfig } from './packem.CzGE8V_d.js';
|
|
20
20
|
|
|
21
21
|
interface CJSInteropOptions {
|
|
22
22
|
addDefaultProperty?: boolean;
|
|
@@ -35,6 +35,11 @@ type CopyPluginOptions = {
|
|
|
35
35
|
targets: MultipleTargetsDesc;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
interface EsmShimCjsSyntaxOptions {
|
|
39
|
+
exclude?: FilterPattern;
|
|
40
|
+
include?: FilterPattern;
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
type IsolatedDeclarationsOptions = {
|
|
39
44
|
exclude?: FilterPattern;
|
|
40
45
|
ignoreErrors?: boolean;
|
|
@@ -62,11 +67,6 @@ interface PatchTypesOptions {
|
|
|
62
67
|
identifierReplacements?: Record<string, Record<string, string>>;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
interface EsmShimCjsSyntaxOptions {
|
|
66
|
-
exclude?: FilterPattern;
|
|
67
|
-
include?: FilterPattern;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
70
|
type DeepPartial<T> = {
|
|
71
71
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
72
72
|
};
|
|
@@ -76,6 +76,7 @@ interface RollupDynamicImportVariablesOptions {
|
|
|
76
76
|
include?: FilterPattern;
|
|
77
77
|
warnOnError?: boolean;
|
|
78
78
|
}
|
|
79
|
+
type Environment = "production" | "development";
|
|
79
80
|
interface RollupBuildOptions {
|
|
80
81
|
alias: RollupAliasOptions | false;
|
|
81
82
|
cjsInterop?: CJSInteropOptions;
|
|
@@ -108,9 +109,10 @@ type Runtime = "react-server" | "react-native" | "edge-light" | "node";
|
|
|
108
109
|
type BuildEntry = {
|
|
109
110
|
cjs?: boolean;
|
|
110
111
|
declaration?: boolean | "compatible" | "node16";
|
|
111
|
-
environment?:
|
|
112
|
+
environment?: Environment;
|
|
112
113
|
esm?: boolean;
|
|
113
114
|
executable?: boolean;
|
|
115
|
+
fileAlias?: boolean;
|
|
114
116
|
input: string;
|
|
115
117
|
name?: string;
|
|
116
118
|
outDir?: string;
|
|
@@ -173,6 +175,7 @@ interface InternalBuildOptions extends BuildOptions {
|
|
|
173
175
|
interface BuildContext {
|
|
174
176
|
buildEntries: BuildContextBuildEntry[];
|
|
175
177
|
dependencyGraphMap: Map<string, Set<[string, string]>>;
|
|
178
|
+
environment: Environment;
|
|
176
179
|
hooks: Hookable<BuildHooks>;
|
|
177
180
|
logger: Pail;
|
|
178
181
|
mode: Mode;
|
|
@@ -194,4 +197,4 @@ interface IsolatedDeclarationsResult {
|
|
|
194
197
|
sourceText: string;
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
export type { BuildConfig as B, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
200
|
+
export type { BuildConfig as B, Environment as E, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
@@ -16,7 +16,7 @@ import { NodePolyfillsOptions } from 'rollup-plugin-polyfill-node';
|
|
|
16
16
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
17
17
|
import { E as EsbuildPluginConfig, O as Options$1 } from './packem.Db-Z_7e-.mjs';
|
|
18
18
|
import { S as SucrasePluginConfig } from './packem.DvWhOdt5.mjs';
|
|
19
|
-
import { S as SwcPluginConfig } from './packem.
|
|
19
|
+
import { S as SwcPluginConfig } from './packem.CzGE8V_d.mjs';
|
|
20
20
|
|
|
21
21
|
interface CJSInteropOptions {
|
|
22
22
|
addDefaultProperty?: boolean;
|
|
@@ -35,6 +35,11 @@ type CopyPluginOptions = {
|
|
|
35
35
|
targets: MultipleTargetsDesc;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
interface EsmShimCjsSyntaxOptions {
|
|
39
|
+
exclude?: FilterPattern;
|
|
40
|
+
include?: FilterPattern;
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
type IsolatedDeclarationsOptions = {
|
|
39
44
|
exclude?: FilterPattern;
|
|
40
45
|
ignoreErrors?: boolean;
|
|
@@ -62,11 +67,6 @@ interface PatchTypesOptions {
|
|
|
62
67
|
identifierReplacements?: Record<string, Record<string, string>>;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
interface EsmShimCjsSyntaxOptions {
|
|
66
|
-
exclude?: FilterPattern;
|
|
67
|
-
include?: FilterPattern;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
70
|
type DeepPartial<T> = {
|
|
71
71
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
72
72
|
};
|
|
@@ -76,6 +76,7 @@ interface RollupDynamicImportVariablesOptions {
|
|
|
76
76
|
include?: FilterPattern;
|
|
77
77
|
warnOnError?: boolean;
|
|
78
78
|
}
|
|
79
|
+
type Environment = "production" | "development";
|
|
79
80
|
interface RollupBuildOptions {
|
|
80
81
|
alias: RollupAliasOptions | false;
|
|
81
82
|
cjsInterop?: CJSInteropOptions;
|
|
@@ -108,9 +109,10 @@ type Runtime = "react-server" | "react-native" | "edge-light" | "node";
|
|
|
108
109
|
type BuildEntry = {
|
|
109
110
|
cjs?: boolean;
|
|
110
111
|
declaration?: boolean | "compatible" | "node16";
|
|
111
|
-
environment?:
|
|
112
|
+
environment?: Environment;
|
|
112
113
|
esm?: boolean;
|
|
113
114
|
executable?: boolean;
|
|
115
|
+
fileAlias?: boolean;
|
|
114
116
|
input: string;
|
|
115
117
|
name?: string;
|
|
116
118
|
outDir?: string;
|
|
@@ -173,6 +175,7 @@ interface InternalBuildOptions extends BuildOptions {
|
|
|
173
175
|
interface BuildContext {
|
|
174
176
|
buildEntries: BuildContextBuildEntry[];
|
|
175
177
|
dependencyGraphMap: Map<string, Set<[string, string]>>;
|
|
178
|
+
environment: Environment;
|
|
176
179
|
hooks: Hookable<BuildHooks>;
|
|
177
180
|
logger: Pail;
|
|
178
181
|
mode: Mode;
|
|
@@ -194,4 +197,4 @@ interface IsolatedDeclarationsResult {
|
|
|
194
197
|
sourceText: string;
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
export type { BuildConfig as B, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
200
|
+
export type { BuildConfig as B, Environment as E, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
@@ -16,7 +16,7 @@ import { NodePolyfillsOptions } from 'rollup-plugin-polyfill-node';
|
|
|
16
16
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
17
17
|
import { E as EsbuildPluginConfig, O as Options$1 } from './packem.Db-Z_7e-.cjs';
|
|
18
18
|
import { S as SucrasePluginConfig } from './packem.DvWhOdt5.cjs';
|
|
19
|
-
import { S as SwcPluginConfig } from './packem.
|
|
19
|
+
import { S as SwcPluginConfig } from './packem.CzGE8V_d.cjs';
|
|
20
20
|
|
|
21
21
|
interface CJSInteropOptions {
|
|
22
22
|
addDefaultProperty?: boolean;
|
|
@@ -35,6 +35,11 @@ type CopyPluginOptions = {
|
|
|
35
35
|
targets: MultipleTargetsDesc;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
interface EsmShimCjsSyntaxOptions {
|
|
39
|
+
exclude?: FilterPattern;
|
|
40
|
+
include?: FilterPattern;
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
type IsolatedDeclarationsOptions = {
|
|
39
44
|
exclude?: FilterPattern;
|
|
40
45
|
ignoreErrors?: boolean;
|
|
@@ -62,11 +67,6 @@ interface PatchTypesOptions {
|
|
|
62
67
|
identifierReplacements?: Record<string, Record<string, string>>;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
interface EsmShimCjsSyntaxOptions {
|
|
66
|
-
exclude?: FilterPattern;
|
|
67
|
-
include?: FilterPattern;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
70
|
type DeepPartial<T> = {
|
|
71
71
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
72
72
|
};
|
|
@@ -76,6 +76,7 @@ interface RollupDynamicImportVariablesOptions {
|
|
|
76
76
|
include?: FilterPattern;
|
|
77
77
|
warnOnError?: boolean;
|
|
78
78
|
}
|
|
79
|
+
type Environment = "production" | "development";
|
|
79
80
|
interface RollupBuildOptions {
|
|
80
81
|
alias: RollupAliasOptions | false;
|
|
81
82
|
cjsInterop?: CJSInteropOptions;
|
|
@@ -108,9 +109,10 @@ type Runtime = "react-server" | "react-native" | "edge-light" | "node";
|
|
|
108
109
|
type BuildEntry = {
|
|
109
110
|
cjs?: boolean;
|
|
110
111
|
declaration?: boolean | "compatible" | "node16";
|
|
111
|
-
environment?:
|
|
112
|
+
environment?: Environment;
|
|
112
113
|
esm?: boolean;
|
|
113
114
|
executable?: boolean;
|
|
115
|
+
fileAlias?: boolean;
|
|
114
116
|
input: string;
|
|
115
117
|
name?: string;
|
|
116
118
|
outDir?: string;
|
|
@@ -173,6 +175,7 @@ interface InternalBuildOptions extends BuildOptions {
|
|
|
173
175
|
interface BuildContext {
|
|
174
176
|
buildEntries: BuildContextBuildEntry[];
|
|
175
177
|
dependencyGraphMap: Map<string, Set<[string, string]>>;
|
|
178
|
+
environment: Environment;
|
|
176
179
|
hooks: Hookable<BuildHooks>;
|
|
177
180
|
logger: Pail;
|
|
178
181
|
mode: Mode;
|
|
@@ -194,4 +197,4 @@ interface IsolatedDeclarationsResult {
|
|
|
194
197
|
sourceText: string;
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
export type { BuildConfig as B, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
200
|
+
export type { BuildConfig as B, Environment as E, IsolatedDeclarationsResult as I, Mode as M, BuildPreset as a, BuildHooks as b };
|
|
@@ -315,7 +315,7 @@ interface Options extends Config {
|
|
|
315
315
|
* and is also available inside configuration functions, plugins,
|
|
316
316
|
* and presets, via the api.env() function.
|
|
317
317
|
*
|
|
318
|
-
* Defaults to `process.env.SWC_ENV || production || "development"`
|
|
318
|
+
* Defaults to `process.env.SWC_ENV || "production" || "development"`
|
|
319
319
|
*/
|
|
320
320
|
envName?: string;
|
|
321
321
|
/**
|
|
@@ -733,7 +733,7 @@ interface GlobalPassOption {
|
|
|
733
733
|
/**
|
|
734
734
|
* Names of environment variables that should be inlined with the value of corresponding env during build.
|
|
735
735
|
*
|
|
736
|
-
* Defaults to `["
|
|
736
|
+
* Defaults to `["NODE_ENV", "SWC_ENV"]`
|
|
737
737
|
*/
|
|
738
738
|
envs?: string[] | Record<string, string>;
|
|
739
739
|
/**
|
|
@@ -315,7 +315,7 @@ interface Options extends Config {
|
|
|
315
315
|
* and is also available inside configuration functions, plugins,
|
|
316
316
|
* and presets, via the api.env() function.
|
|
317
317
|
*
|
|
318
|
-
* Defaults to `process.env.SWC_ENV || production || "development"`
|
|
318
|
+
* Defaults to `process.env.SWC_ENV || "production" || "development"`
|
|
319
319
|
*/
|
|
320
320
|
envName?: string;
|
|
321
321
|
/**
|
|
@@ -733,7 +733,7 @@ interface GlobalPassOption {
|
|
|
733
733
|
/**
|
|
734
734
|
* Names of environment variables that should be inlined with the value of corresponding env during build.
|
|
735
735
|
*
|
|
736
|
-
* Defaults to `["
|
|
736
|
+
* Defaults to `["NODE_ENV", "SWC_ENV"]`
|
|
737
737
|
*/
|
|
738
738
|
envs?: string[] | Record<string, string>;
|
|
739
739
|
/**
|
|
@@ -315,7 +315,7 @@ interface Options extends Config {
|
|
|
315
315
|
* and is also available inside configuration functions, plugins,
|
|
316
316
|
* and presets, via the api.env() function.
|
|
317
317
|
*
|
|
318
|
-
* Defaults to `process.env.SWC_ENV || production || "development"`
|
|
318
|
+
* Defaults to `process.env.SWC_ENV || "production" || "development"`
|
|
319
319
|
*/
|
|
320
320
|
envName?: string;
|
|
321
321
|
/**
|
|
@@ -733,7 +733,7 @@ interface GlobalPassOption {
|
|
|
733
733
|
/**
|
|
734
734
|
* Names of environment variables that should be inlined with the value of corresponding env during build.
|
|
735
735
|
*
|
|
736
|
-
* Defaults to `["
|
|
736
|
+
* Defaults to `["NODE_ENV", "SWC_ENV"]`
|
|
737
737
|
*/
|
|
738
738
|
envs?: string[] | Record<string, string>;
|
|
739
739
|
/**
|