vite 3.0.0-alpha.4 → 3.0.0-alpha.7

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.
Files changed (81) hide show
  1. package/dist/node/chunks/{dep-28f8c91c.js → dep-16fa9be9.js} +1 -1
  2. package/dist/node/chunks/{dep-24157481.js → dep-17430d09.js} +0 -0
  3. package/dist/node/chunks/{dep-ce833324.js → dep-395deadd.js} +1 -1
  4. package/dist/node/chunks/{dep-35b61ee3.js → dep-3a62832d.js} +100 -47
  5. package/dist/node/chunks/{dep-aea1d487.js → dep-e214e00e.js} +33673 -33367
  6. package/dist/node/cli.js +7 -5
  7. package/dist/node/constants.js +1 -1
  8. package/dist/node/index.d.ts +36 -17
  9. package/dist/node/index.js +1 -1
  10. package/dist/node-cjs/publicUtils.cjs +0 -11
  11. package/package.json +10 -9
  12. package/dist/node/build.d.ts +0 -178
  13. package/dist/node/certificate.d.ts +0 -2
  14. package/dist/node/cli.d.ts +0 -1
  15. package/dist/node/config.d.ts +0 -240
  16. package/dist/node/constants.d.ts +0 -35
  17. package/dist/node/env.d.ts +0 -3
  18. package/dist/node/http.d.ts +0 -88
  19. package/dist/node/logger.d.ts +0 -31
  20. package/dist/node/optimizer/esbuildDepPlugin.d.ts +0 -4
  21. package/dist/node/optimizer/index.d.ts +0 -167
  22. package/dist/node/optimizer/registerMissing.d.ts +0 -3
  23. package/dist/node/optimizer/scan.d.ts +0 -8
  24. package/dist/node/packages.d.ts +0 -27
  25. package/dist/node/plugin.d.ts +0 -129
  26. package/dist/node/plugins/asset.d.ts +0 -68
  27. package/dist/node/plugins/assetImportMetaUrl.d.ts +0 -13
  28. package/dist/node/plugins/clientInjections.d.ts +0 -7
  29. package/dist/node/plugins/css.d.ts +0 -86
  30. package/dist/node/plugins/dataUri.d.ts +0 -5
  31. package/dist/node/plugins/define.d.ts +0 -3
  32. package/dist/node/plugins/dynamicImportVars.d.ts +0 -9
  33. package/dist/node/plugins/ensureWatch.d.ts +0 -5
  34. package/dist/node/plugins/esbuild.d.ts +0 -15
  35. package/dist/node/plugins/html.d.ts +0 -120
  36. package/dist/node/plugins/importAnalysis.d.ts +0 -47
  37. package/dist/node/plugins/importAnalysisBuild.d.ts +0 -16
  38. package/dist/node/plugins/importMetaGlob.d.ts +0 -34
  39. package/dist/node/plugins/index.d.ts +0 -3
  40. package/dist/node/plugins/json.d.ts +0 -23
  41. package/dist/node/plugins/loadFallback.d.ts +0 -5
  42. package/dist/node/plugins/manifest.d.ts +0 -14
  43. package/dist/node/plugins/metadata.d.ts +0 -9
  44. package/dist/node/plugins/modulePreloadPolyfill.d.ts +0 -4
  45. package/dist/node/plugins/optimizedDeps.d.ts +0 -4
  46. package/dist/node/plugins/preAlias.d.ts +0 -5
  47. package/dist/node/plugins/reporter.d.ts +0 -3
  48. package/dist/node/plugins/resolve.d.ts +0 -39
  49. package/dist/node/plugins/splitVendorChunk.d.ts +0 -12
  50. package/dist/node/plugins/ssrRequireHook.d.ts +0 -12
  51. package/dist/node/plugins/terser.d.ts +0 -3
  52. package/dist/node/plugins/wasm.d.ts +0 -4
  53. package/dist/node/plugins/worker.d.ts +0 -9
  54. package/dist/node/plugins/workerImportMetaUrl.d.ts +0 -3
  55. package/dist/node/preview.d.ts +0 -33
  56. package/dist/node/publicUtils.d.ts +0 -11
  57. package/dist/node/server/hmr.d.ts +0 -39
  58. package/dist/node/server/index.d.ts +0 -198
  59. package/dist/node/server/middlewares/base.d.ts +0 -3
  60. package/dist/node/server/middlewares/compression.d.ts +0 -1
  61. package/dist/node/server/middlewares/error.d.ts +0 -8
  62. package/dist/node/server/middlewares/indexHtml.d.ts +0 -4
  63. package/dist/node/server/middlewares/proxy.d.ts +0 -20
  64. package/dist/node/server/middlewares/spaFallback.d.ts +0 -2
  65. package/dist/node/server/middlewares/static.d.ts +0 -6
  66. package/dist/node/server/middlewares/time.d.ts +0 -2
  67. package/dist/node/server/middlewares/transform.d.ts +0 -3
  68. package/dist/node/server/moduleGraph.d.ts +0 -55
  69. package/dist/node/server/openBrowser.d.ts +0 -15
  70. package/dist/node/server/pluginContainer.d.ts +0 -41
  71. package/dist/node/server/searchRoot.d.ts +0 -8
  72. package/dist/node/server/send.d.ts +0 -10
  73. package/dist/node/server/sourcemap.d.ts +0 -11
  74. package/dist/node/server/transformRequest.d.ts +0 -14
  75. package/dist/node/server/ws.d.ts +0 -55
  76. package/dist/node/ssr/ssrExternal.d.ts +0 -11
  77. package/dist/node/ssr/ssrManifestPlugin.d.ts +0 -3
  78. package/dist/node/ssr/ssrModuleLoader.d.ts +0 -7
  79. package/dist/node/ssr/ssrStacktrace.d.ts +0 -3
  80. package/dist/node/ssr/ssrTransform.d.ts +0 -14
  81. package/dist/node/utils.d.ts +0 -144
package/dist/node/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { performance } from 'perf_hooks';
2
2
  import { EventEmitter } from 'events';
3
- import { u as colors, i as createLogger, e as resolveConfig } from './chunks/dep-aea1d487.js';
3
+ import { v as colors, j as createLogger, e as resolveConfig } from './chunks/dep-e214e00e.js';
4
4
  import { VERSION } from './constants.js';
5
5
  import 'fs';
6
6
  import 'path';
@@ -682,7 +682,7 @@ cli
682
682
  .action(async (root, options) => {
683
683
  // output structure is preserved even after bundling so require()
684
684
  // is ok here
685
- const { createServer } = await import('./chunks/dep-aea1d487.js').then(function (n) { return n.A; });
685
+ const { createServer } = await import('./chunks/dep-e214e00e.js').then(function (n) { return n.B; });
686
686
  try {
687
687
  const server = await createServer({
688
688
  root,
@@ -724,10 +724,11 @@ cli
724
724
  `or specify minifier to use (default: esbuild)`)
725
725
  .option('--manifest [name]', `[boolean | string] emit build manifest json`)
726
726
  .option('--ssrManifest [name]', `[boolean | string] emit ssr manifest json`)
727
+ .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle (experimental)`)
727
728
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
728
729
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
729
730
  .action(async (root, options) => {
730
- const { build } = await import('./chunks/dep-aea1d487.js').then(function (n) { return n.z; });
731
+ const { build } = await import('./chunks/dep-e214e00e.js').then(function (n) { return n.A; });
731
732
  const buildOptions = cleanOptions(options);
732
733
  try {
733
734
  await build({
@@ -737,6 +738,7 @@ cli
737
738
  configFile: options.config,
738
739
  logLevel: options.logLevel,
739
740
  clearScreen: options.clearScreen,
741
+ force: options.force,
740
742
  build: buildOptions
741
743
  });
742
744
  }
@@ -750,7 +752,7 @@ cli
750
752
  .command('optimize [root]', 'pre-bundle dependencies')
751
753
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
752
754
  .action(async (root, options) => {
753
- const { optimizeDeps } = await import('./chunks/dep-aea1d487.js').then(function (n) { return n.y; });
755
+ const { optimizeDeps } = await import('./chunks/dep-e214e00e.js').then(function (n) { return n.z; });
754
756
  try {
755
757
  const config = await resolveConfig({
756
758
  root,
@@ -773,7 +775,7 @@ cli
773
775
  .option('--https', `[boolean] use TLS + HTTP/2`)
774
776
  .option('--open [path]', `[boolean | string] open browser on startup`)
775
777
  .action(async (root, options) => {
776
- const { preview } = await import('./chunks/dep-aea1d487.js').then(function (n) { return n.B; });
778
+ const { preview } = await import('./chunks/dep-e214e00e.js').then(function (n) { return n.C; });
777
779
  try {
778
780
  const server = await preview({
779
781
  root,
@@ -1,7 +1,7 @@
1
1
  import path, { resolve } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
 
4
- var version = "3.0.0-alpha.4";
4
+ var version = "3.0.0-alpha.7";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -23,7 +23,6 @@ import type * as net from 'net';
23
23
  import type { OutgoingHttpHeaders } from 'http';
24
24
  import type { OutputBundle } from 'rollup';
25
25
  import type { OutputChunk } from 'rollup';
26
- import { parse } from 'es-module-lexer';
27
26
  import type { PartialResolvedId } from 'rollup';
28
27
  import type { Plugin as Plugin_3 } from 'rollup';
29
28
  import type { PluginContext } from 'rollup';
@@ -534,6 +533,13 @@ export declare interface DepOptimizationOptions {
534
533
  * vite project root. This will overwrite default entries inference.
535
534
  */
536
535
  entries?: string | string[];
536
+ /**
537
+ * Enable esbuild based scan phase, to get back to the optimized deps discovery
538
+ * strategy used in Vite v2
539
+ * @default false
540
+ * @experimental
541
+ */
542
+ devScan?: boolean;
537
543
  /**
538
544
  * Force optimize listed dependencies (must be resolvable import paths,
539
545
  * cannot be globs).
@@ -573,11 +579,13 @@ export declare interface DepOptimizationOptions {
573
579
  */
574
580
  extensions?: string[];
575
581
  /**
576
- * Disables dependencies optimizations
582
+ * Disables dependencies optimizations, true disables the optimizer during
583
+ * build and dev. Pass 'build' or 'dev' to only disable the optimizer in
584
+ * one of the modes. Deps optimization is enabled by default in both
577
585
  * @default false
578
586
  * @experimental
579
587
  */
580
- disabled?: boolean;
588
+ disabled?: boolean | 'build' | 'dev';
581
589
  }
582
590
 
583
591
  export declare interface DepOptimizationProcessing {
@@ -596,6 +604,17 @@ export declare interface DepOptimizationResult {
596
604
  cancel: () => void;
597
605
  }
598
606
 
607
+ export declare interface DepsOptimizer {
608
+ metadata: DepOptimizationMetadata;
609
+ scanProcessing?: Promise<void>;
610
+ registerMissingImport: (id: string, resolved: string) => OptimizedDepInfo;
611
+ run: () => void;
612
+ isOptimizedDepFile: (id: string) => boolean;
613
+ isOptimizedDepUrl: (url: string) => boolean;
614
+ getOptimizedDepId: (depInfo: OptimizedDepInfo) => string;
615
+ options: DepOptimizationOptions;
616
+ }
617
+
599
618
  export declare interface ErrorPayload {
600
619
  type: 'error'
601
620
  err: {
@@ -636,9 +655,12 @@ export declare interface ExperimentalOptions {
636
655
  importGlobRestoreExtension?: boolean;
637
656
  }
638
657
 
639
- export declare type ExportsData = ReturnType<typeof parse> & {
640
- hasReExports?: true;
641
- jsxLoader?: true;
658
+ export declare type ExportsData = {
659
+ hasImports: boolean;
660
+ exports: readonly string[];
661
+ facade: boolean;
662
+ hasReExports?: boolean;
663
+ jsxLoader?: boolean;
642
664
  };
643
665
 
644
666
  export declare interface FileSystemServeOptions {
@@ -1142,8 +1164,11 @@ export declare interface InternalResolveOptions extends ResolveOptions {
1142
1164
  isFromTsImporter?: boolean;
1143
1165
  tryEsmOnly?: boolean;
1144
1166
  scan?: boolean;
1167
+ getDepsOptimizer?: () => DepsOptimizer | undefined;
1145
1168
  }
1146
1169
 
1170
+ export declare function isDepsOptimizerEnabled(config: ResolvedConfig): boolean;
1171
+
1147
1172
  export declare interface JsonOptions {
1148
1173
  /**
1149
1174
  * Generate a named export for every property of the JSON object
@@ -1300,12 +1325,6 @@ export declare interface OptimizedDepInfo {
1300
1325
  exportsData?: Promise<ExportsData>;
1301
1326
  }
1302
1327
 
1303
- export declare interface OptimizedDeps {
1304
- metadata: DepOptimizationMetadata;
1305
- scanProcessing?: Promise<void>;
1306
- registerMissingImport: (id: string, resolved: string) => OptimizedDepInfo;
1307
- }
1308
-
1309
1328
  /**
1310
1329
  * Used by Vite CLI when running `vite optimize`
1311
1330
  */
@@ -1817,10 +1836,6 @@ export declare interface SendOptions {
1817
1836
  export declare type ServerHook = (server: ViteDevServer) => (() => void) | void | Promise<(() => void) | void>;
1818
1837
 
1819
1838
  export declare interface ServerOptions extends CommonServerOptions {
1820
- /**
1821
- * Force dep pre-optimization regardless of whether deps have changed.
1822
- */
1823
- force?: boolean;
1824
1839
  /**
1825
1840
  * Configure HMR-specific options (port, host, path & protocol)
1826
1841
  */
@@ -2162,6 +2177,11 @@ export declare interface UserConfig {
2162
2177
  * Preview specific options, e.g. host, port, https...
2163
2178
  */
2164
2179
  preview?: PreviewOptions;
2180
+ /**
2181
+ * Force dep pre-optimization regardless of whether deps have changed.
2182
+ * @experimental
2183
+ */
2184
+ force?: boolean;
2165
2185
  /**
2166
2186
  * Dep optimization options
2167
2187
  */
@@ -2314,7 +2334,6 @@ export declare interface ViteDevServer {
2314
2334
  * @param forceOptimize - force the optimizer to re-bundle, same as --force cli flag
2315
2335
  */
2316
2336
  restart(forceOptimize?: boolean): Promise<void>;
2317
- /* Excluded from this release type: _optimizedDeps */
2318
2337
  /* Excluded from this release type: _importGlobMap */
2319
2338
  /* Excluded from this release type: _ssrExternals */
2320
2339
  /* Excluded from this release type: _restartPromise */
@@ -1,4 +1,4 @@
1
- export { b as build, i as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, l as loadConfigFromFile, k as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, e as resolveConfig, q as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, j as searchForWorkspaceRoot, h as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-aea1d487.js';
1
+ export { b as build, j as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, i as isDepsOptimizerEnabled, l as loadConfigFromFile, q as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, e as resolveConfig, u as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, k as searchForWorkspaceRoot, h as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-e214e00e.js';
2
2
  import 'fs';
3
3
  import 'path';
4
4
  import 'url';
@@ -136,17 +136,6 @@ for (let i = 0; i < chars.length; i++) {
136
136
  charToInt[c] = i;
137
137
  }
138
138
 
139
- Object.freeze({
140
- source: null,
141
- line: null,
142
- column: null,
143
- name: null,
144
- });
145
- Object.freeze({
146
- line: null,
147
- column: null,
148
- });
149
-
150
139
  var picocolors = {exports: {}};
151
140
 
152
141
  let tty = require$$0__default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "3.0.0-alpha.4",
3
+ "version": "3.0.0-alpha.7",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -49,10 +49,11 @@
49
49
  "dev": "rimraf dist && pnpm run build-bundle -w",
50
50
  "build": "rimraf dist && run-s build-bundle build-types",
51
51
  "build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
52
- "build-types": "run-s build-temp-types patch-types roll-types",
52
+ "build-types": "run-s build-temp-types patch-types roll-types check-dist-types",
53
53
  "build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
54
54
  "patch-types": "esno scripts/patchTypes.ts",
55
55
  "roll-types": "api-extractor run && rimraf temp",
56
+ "check-dist-types": "tsc --project tsconfig.check.json",
56
57
  "lint": "eslint --ext .ts src/**",
57
58
  "format": "prettier --write --parser typescript \"src/**/*.ts\"",
58
59
  "prepublishOnly": "npm run build"
@@ -60,7 +61,7 @@
60
61
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
61
62
  "dependencies": {
62
63
  "esbuild": "^0.14.38",
63
- "postcss": "^8.4.13",
64
+ "postcss": "^8.4.14",
64
65
  "resolve": "^1.22.0",
65
66
  "rollup": "^2.72.1"
66
67
  },
@@ -69,17 +70,17 @@
69
70
  },
70
71
  "devDependencies": {
71
72
  "@ampproject/remapping": "^2.2.0",
72
- "@babel/parser": "^7.17.10",
73
- "@babel/types": "^7.17.10",
74
- "@jridgewell/trace-mapping": "^0.3.10",
73
+ "@babel/parser": "^7.18.0",
74
+ "@babel/types": "^7.18.0",
75
+ "@jridgewell/trace-mapping": "^0.3.13",
75
76
  "@rollup/plugin-alias": "^3.1.9",
76
77
  "@rollup/plugin-commonjs": "^21.1.0",
77
78
  "@rollup/plugin-dynamic-import-vars": "^1.4.3",
78
79
  "@rollup/plugin-json": "^4.1.0",
79
- "@rollup/plugin-node-resolve": "13.2.1",
80
+ "@rollup/plugin-node-resolve": "13.3.0",
80
81
  "@rollup/plugin-typescript": "^8.3.2",
81
82
  "@rollup/pluginutils": "^4.2.1",
82
- "@vue/compiler-dom": "^3.2.33",
83
+ "@vue/compiler-dom": "^3.2.35",
83
84
  "acorn": "^8.7.1",
84
85
  "cac": "6.7.9",
85
86
  "chokidar": "^3.5.3",
@@ -99,7 +100,7 @@
99
100
  "http-proxy": "^1.18.1",
100
101
  "json5": "^2.2.1",
101
102
  "launch-editor-middleware": "^2.3.0",
102
- "magic-string": "^0.26.1",
103
+ "magic-string": "^0.26.2",
103
104
  "micromatch": "^4.0.5",
104
105
  "mrmime": "^1.0.0",
105
106
  "node-forge": "^1.3.1",
@@ -1,178 +0,0 @@
1
- import type { ModuleFormat, Plugin, RollupOptions, RollupOutput, RollupWarning, RollupWatcher, WarningHandler, WatcherOptions } from 'rollup';
2
- import type { Terser } from 'types/terser';
3
- import type { RollupCommonJSOptions } from 'types/commonjs';
4
- import type { RollupDynamicImportVarsOptions } from 'types/dynamicImportVars';
5
- import type { TransformOptions } from 'esbuild';
6
- import type { InlineConfig, ResolvedConfig } from './config';
7
- export interface BuildOptions {
8
- /**
9
- * Compatibility transform target. The transform is performed with esbuild
10
- * and the lowest supported target is es2015/es6. Note this only handles
11
- * syntax transformation and does not cover polyfills (except for dynamic
12
- * import)
13
- *
14
- * Default: 'modules' - Similar to `@babel/preset-env`'s targets.esmodules,
15
- * transpile targeting browsers that natively support dynamic es module imports.
16
- * https://caniuse.com/es6-module-dynamic-import
17
- *
18
- * Another special value is 'esnext' - which only performs minimal transpiling
19
- * (for minification compat) and assumes native dynamic imports support.
20
- *
21
- * For custom targets, see https://esbuild.github.io/api/#target and
22
- * https://esbuild.github.io/content-types/#javascript for more details.
23
- */
24
- target?: 'modules' | TransformOptions['target'] | false;
25
- /**
26
- * whether to inject module preload polyfill.
27
- * Note: does not apply to library mode.
28
- * @default true
29
- */
30
- polyfillModulePreload?: boolean;
31
- /**
32
- * Directory relative from `root` where build output will be placed. If the
33
- * directory exists, it will be removed before the build.
34
- * @default 'dist'
35
- */
36
- outDir?: string;
37
- /**
38
- * Directory relative from `outDir` where the built js/css/image assets will
39
- * be placed.
40
- * @default 'assets'
41
- */
42
- assetsDir?: string;
43
- /**
44
- * Static asset files smaller than this number (in bytes) will be inlined as
45
- * base64 strings. Default limit is `4096` (4kb). Set to `0` to disable.
46
- * @default 4096
47
- */
48
- assetsInlineLimit?: number;
49
- /**
50
- * Whether to code-split CSS. When enabled, CSS in async chunks will be
51
- * inlined as strings in the chunk and inserted via dynamically created
52
- * style tags when the chunk is loaded.
53
- * @default true
54
- */
55
- cssCodeSplit?: boolean;
56
- /**
57
- * An optional separate target for CSS minification.
58
- * As esbuild only supports configuring targets to mainstream
59
- * browsers, users may need this option when they are targeting
60
- * a niche browser that comes with most modern JavaScript features
61
- * but has poor CSS support, e.g. Android WeChat WebView, which
62
- * doesn't support the #RGBA syntax.
63
- */
64
- cssTarget?: TransformOptions['target'] | false;
65
- /**
66
- * If `true`, a separate sourcemap file will be created. If 'inline', the
67
- * sourcemap will be appended to the resulting output file as data URI.
68
- * 'hidden' works like `true` except that the corresponding sourcemap
69
- * comments in the bundled files are suppressed.
70
- * @default false
71
- */
72
- sourcemap?: boolean | 'inline' | 'hidden';
73
- /**
74
- * Set to `false` to disable minification, or specify the minifier to use.
75
- * Available options are 'terser' or 'esbuild'.
76
- * @default 'esbuild'
77
- */
78
- minify?: boolean | 'terser' | 'esbuild';
79
- /**
80
- * Options for terser
81
- * https://terser.org/docs/api-reference#minify-options
82
- */
83
- terserOptions?: Terser.MinifyOptions;
84
- /**
85
- * Will be merged with internal rollup options.
86
- * https://rollupjs.org/guide/en/#big-list-of-options
87
- */
88
- rollupOptions?: RollupOptions;
89
- /**
90
- * Options to pass on to `@rollup/plugin-commonjs`
91
- */
92
- commonjsOptions?: RollupCommonJSOptions;
93
- /**
94
- * Options to pass on to `@rollup/plugin-dynamic-import-vars`
95
- */
96
- dynamicImportVarsOptions?: RollupDynamicImportVarsOptions;
97
- /**
98
- * Whether to write bundle to disk
99
- * @default true
100
- */
101
- write?: boolean;
102
- /**
103
- * Empty outDir on write.
104
- * @default true when outDir is a sub directory of project root
105
- */
106
- emptyOutDir?: boolean | null;
107
- /**
108
- * Whether to emit a manifest.json under assets dir to map hash-less filenames
109
- * to their hashed versions. Useful when you want to generate your own HTML
110
- * instead of using the one generated by Vite.
111
- *
112
- * Example:
113
- *
114
- * ```json
115
- * {
116
- * "main.js": {
117
- * "file": "main.68fe3fad.js",
118
- * "css": "main.e6b63442.css",
119
- * "imports": [...],
120
- * "dynamicImports": [...]
121
- * }
122
- * }
123
- * ```
124
- * @default false
125
- */
126
- manifest?: boolean | string;
127
- /**
128
- * Build in library mode. The value should be the global name of the lib in
129
- * UMD mode. This will produce esm + cjs + umd bundle formats with default
130
- * configurations that are suitable for distributing libraries.
131
- */
132
- lib?: LibraryOptions | false;
133
- /**
134
- * Produce SSR oriented build. Note this requires specifying SSR entry via
135
- * `rollupOptions.input`.
136
- */
137
- ssr?: boolean | string;
138
- /**
139
- * Generate SSR manifest for determining style links and asset preload
140
- * directives in production.
141
- */
142
- ssrManifest?: boolean | string;
143
- /**
144
- * Set to false to disable reporting compressed chunk sizes.
145
- * Can slightly improve build speed.
146
- */
147
- reportCompressedSize?: boolean;
148
- /**
149
- * Adjust chunk size warning limit (in kbs).
150
- * @default 500
151
- */
152
- chunkSizeWarningLimit?: number;
153
- /**
154
- * Rollup watch options
155
- * https://rollupjs.org/guide/en/#watchoptions
156
- */
157
- watch?: WatcherOptions | null;
158
- }
159
- export interface LibraryOptions {
160
- entry: string;
161
- name?: string;
162
- formats?: LibraryFormats[];
163
- fileName?: string | ((format: ModuleFormat) => string);
164
- }
165
- export declare type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife';
166
- export declare type ResolvedBuildOptions = Required<BuildOptions>;
167
- export declare function resolveBuildOptions(raw?: BuildOptions): ResolvedBuildOptions;
168
- export declare function resolveBuildPlugins(config: ResolvedConfig): {
169
- pre: Plugin[];
170
- post: Plugin[];
171
- };
172
- /**
173
- * Bundles the app for production.
174
- * Returns a Promise containing the build result.
175
- */
176
- export declare function build(inlineConfig?: InlineConfig): Promise<RollupOutput | RollupOutput[] | RollupWatcher>;
177
- export declare function resolveLibFilename(libOptions: LibraryOptions, format: ModuleFormat, root: string): string;
178
- export declare function onRollupWarning(warning: RollupWarning, warn: WarningHandler, config: ResolvedConfig): void;
@@ -1,2 +0,0 @@
1
- import 'node-forge/lib/pki';
2
- export declare function createCertificate(): string;
@@ -1 +0,0 @@
1
- export {};