vite 2.7.0-beta.8 → 2.7.2
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/CHANGELOG.md +106 -29
- package/LICENSE.md +0 -17
- package/dist/node/build.d.ts +200 -0
- package/dist/node/chunks/{dep-03d6dbab.js → dep-453486e7.js} +2 -2
- package/dist/node/chunks/{dep-03d6dbab.js.map → dep-453486e7.js.map} +1 -1
- package/dist/node/chunks/{dep-d87be5e9.js → dep-7817f5b4.js} +1557 -1382
- package/dist/node/chunks/dep-7817f5b4.js.map +1 -0
- package/dist/node/chunks/{dep-8fdf8f48.js → dep-93096c54.js} +2 -2
- package/dist/node/chunks/{dep-8fdf8f48.js.map → dep-93096c54.js.map} +1 -1
- package/dist/node/chunks/{dep-b192ffe4.js → dep-fffc0487.js} +2 -2
- package/dist/node/chunks/{dep-b192ffe4.js.map → dep-fffc0487.js.map} +1 -1
- package/dist/node/cli.d.ts +1 -0
- package/dist/node/cli.js +4 -4
- package/dist/node/cli.js.map +1 -1
- package/dist/node/config.d.ts +202 -0
- package/dist/node/constants.d.ts +33 -0
- package/dist/node/http.d.ts +84 -0
- package/dist/node/importGlob.d.ts +9 -0
- package/dist/node/index.d.ts +280 -280
- package/dist/node/index.js +1 -1
- package/dist/node/logger.d.ts +35 -0
- package/dist/node/optimizer/esbuildDepPlugin.d.ts +4 -0
- package/dist/node/optimizer/index.d.ts +66 -0
- package/dist/node/optimizer/registerMissing.d.ts +2 -0
- package/dist/node/optimizer/scan.d.ts +9 -0
- package/dist/node/packages.d.ts +25 -0
- package/dist/node/plugin.d.ts +115 -0
- package/dist/node/plugins/asset.d.ts +40 -0
- package/dist/node/plugins/assetImportMetaUrl.d.ts +13 -0
- package/dist/node/plugins/clientInjections.d.ts +7 -0
- package/dist/node/plugins/css.d.ts +72 -0
- package/dist/node/plugins/dataUri.d.ts +5 -0
- package/dist/node/plugins/define.d.ts +3 -0
- package/dist/node/plugins/esbuild.d.ts +15 -0
- package/dist/node/plugins/html.d.ts +102 -0
- package/dist/node/plugins/importAnalysis.d.ts +46 -0
- package/dist/node/plugins/importAnalysisBuild.d.ts +15 -0
- package/dist/node/plugins/index.d.ts +3 -0
- package/dist/node/plugins/json.d.ts +22 -0
- package/dist/node/plugins/loadFallback.d.ts +5 -0
- package/dist/node/plugins/manifest.d.ts +14 -0
- package/dist/node/plugins/modulePreloadPolyfill.d.ts +4 -0
- package/dist/node/plugins/preAlias.d.ts +5 -0
- package/dist/node/plugins/reporter.d.ts +3 -0
- package/dist/node/plugins/resolve.d.ts +38 -0
- package/dist/node/plugins/ssrRequireHook.d.ts +12 -0
- package/dist/node/plugins/terser.d.ts +3 -0
- package/dist/node/plugins/wasm.d.ts +3 -0
- package/dist/node/plugins/worker.d.ts +3 -0
- package/dist/node/preview.d.ts +31 -0
- package/dist/node/server/hmr.d.ts +37 -0
- package/dist/node/server/index.d.ts +214 -0
- package/dist/node/server/middlewares/base.d.ts +3 -0
- package/dist/node/server/middlewares/error.d.ts +8 -0
- package/dist/node/server/middlewares/indexHtml.d.ts +4 -0
- package/dist/node/server/middlewares/proxy.d.ts +20 -0
- package/dist/node/server/middlewares/spaFallback.d.ts +2 -0
- package/dist/node/server/middlewares/static.d.ts +6 -0
- package/dist/node/server/middlewares/time.d.ts +2 -0
- package/dist/node/server/middlewares/transform.d.ts +3 -0
- package/dist/node/server/moduleGraph.d.ts +53 -0
- package/dist/node/server/openBrowser.d.ts +15 -0
- package/dist/node/server/pluginContainer.d.ts +37 -0
- package/dist/node/server/searchRoot.d.ts +8 -0
- package/dist/node/server/send.d.ts +4 -0
- package/dist/node/server/sourcemap.d.ts +8 -0
- package/dist/node/server/transformRequest.d.ts +14 -0
- package/dist/node/server/ws.d.ts +14 -0
- package/dist/node/ssr/ssrExternal.d.ts +7 -0
- package/dist/node/ssr/ssrManifestPlugin.d.ts +3 -0
- package/dist/node/ssr/ssrModuleLoader.d.ts +7 -0
- package/dist/node/ssr/ssrStacktrace.d.ts +3 -0
- package/dist/node/ssr/ssrTransform.d.ts +8 -0
- package/dist/node/utils.d.ts +114 -0
- package/package.json +9 -10
- package/types/ws.d.ts +277 -281
- package/dist/node/chunks/dep-d87be5e9.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
+
## [2.7.2](https://github.com/vitejs/vite/compare/v2.7.1...v2.7.2) (2021-12-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **html:** empty script ([#6057](https://github.com/vitejs/vite/issues/6057)) ([1487223](https://github.com/vitejs/vite/commit/1487223f39b7555b1050b660d847eabf4d20249f))
|
|
7
|
+
* **lexGlobPattern:** edge case of glob import ([#6022](https://github.com/vitejs/vite/issues/6022)) ([d4c5cff](https://github.com/vitejs/vite/commit/d4c5cff551ad9fb721243f8abdbf0c78f5b5a7ec))
|
|
8
|
+
* ws types ([#6083](https://github.com/vitejs/vite/issues/6083)) ([1ded1a8](https://github.com/vitejs/vite/commit/1ded1a835bfb64f2c70c8c153e979b7911c9a8c1))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## [2.7.1](https://github.com/vitejs/vite/compare/v2.7.0...v2.7.1) (2021-12-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **ssr:** `ssrTransform` handling for empty ArrayPattern ([#5988](https://github.com/vitejs/vite/issues/5988)) ([79aa687](https://github.com/vitejs/vite/commit/79aa68744cf17553448bce5c175a25f785e4a743))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# [2.7.0](https://github.com/vitejs/vite/compare/v2.7.0-beta.11...v2.7.0) (2021-12-07)
|
|
22
|
+
|
|
23
|
+
- 🎉 Revamped SSR dependency handling
|
|
24
|
+
- 🧩 API consolidation
|
|
25
|
+
- 🛑 server.fs.strict by default
|
|
26
|
+
|
|
27
|
+
### BREAKING CHANGES
|
|
28
|
+
|
|
29
|
+
- `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341))
|
|
30
|
+
See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details.
|
|
31
|
+
- Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253))
|
|
32
|
+
Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now:
|
|
33
|
+
```ts
|
|
34
|
+
export interface Plugin extends RollupPlugin {
|
|
35
|
+
// ... other hooks
|
|
36
|
+
resolveId?(this: PluginContext, source: string, importer: string | undefined, options: {
|
|
37
|
+
custom?: CustomPluginOptions;
|
|
38
|
+
ssr?: boolean;
|
|
39
|
+
}): Promise<ResolveIdResult> | ResolveIdResult;
|
|
40
|
+
load?(this: PluginContext, id: string, options?: {
|
|
41
|
+
ssr?: boolean;
|
|
42
|
+
}): Promise<LoadResult> | LoadResult;
|
|
43
|
+
transform?(this: TransformPluginContext, code: string, id: string, options?: {
|
|
44
|
+
ssr?: boolean;
|
|
45
|
+
}): Promise<TransformResult> | TransformResult;
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7.
|
|
49
|
+
- `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294))
|
|
50
|
+
- Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207))
|
|
51
|
+
Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`.
|
|
52
|
+
- Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407))
|
|
53
|
+
This API was first introduced in 2.6 and it is still in flux.
|
|
54
|
+
- resolve `rollupOptions.input` paths ([#5601](https://github.com/vitejs/vite/pull/5601))
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* expose `ssrTransform` to server ([#5983](https://github.com/vitejs/vite/issues/5983)) ([8184feb](https://github.com/vitejs/vite/commit/8184feba29c6a89d58bc4437977d22658e946e0c))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# [2.7.0-beta.11](https://github.com/vitejs/vite/compare/v2.7.0-beta.10...v2.7.0-beta.11) (2021-12-06)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* **ssr:** allow primitive default exports and forwarded exports ([#5973](https://github.com/vitejs/vite/issues/5973)) ([a47b663](https://github.com/vitejs/vite/commit/a47b663ad06af8c5bf87128035f6b112de0ecd16))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# [2.7.0-beta.10](https://github.com/vitejs/vite/compare/v2.7.0-beta.9...v2.7.0-beta.10) (2021-12-02)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
* invalidate inlined proxy scripts on change ([#5891](https://github.com/vitejs/vite/issues/5891)) ([5b8c58b](https://github.com/vitejs/vite/commit/5b8c58bf9d2fe141cea9bde9492ccbedf9b76213))
|
|
77
|
+
* read the correct package.json in ssrExternal ([#5927](https://github.com/vitejs/vite/issues/5927)) ([7edabb4](https://github.com/vitejs/vite/commit/7edabb46de3ce63e078e0cda7cd3ed9e5cdd0f2a)), closes [#5890](https://github.com/vitejs/vite/issues/5890)
|
|
78
|
+
* **resolve:** dont overwrite `isRequire` from `baseOptions` ([#5872](https://github.com/vitejs/vite/issues/5872)) ([2b91e5a](https://github.com/vitejs/vite/commit/2b91e5aadaee0947eb9864367ae85762573a8dc4))
|
|
79
|
+
* **scan:** handle local scripts with lang=ts ([#5850](https://github.com/vitejs/vite/issues/5850)) ([7ed8702](https://github.com/vitejs/vite/commit/7ed870273206b5e9dcedda6f0149b7b3324dea45))
|
|
80
|
+
* SSR import in dev can't resolve default import (fix [#5706](https://github.com/vitejs/vite/issues/5706)) ([#5923](https://github.com/vitejs/vite/issues/5923)) ([21d79d7](https://github.com/vitejs/vite/commit/21d79d753af145f2c7ebb7dd5b0b1a4a298f96c5))
|
|
81
|
+
* **ssr:** skip dedupe require if noExternal true ([#5928](https://github.com/vitejs/vite/issues/5928)) ([f6aa7fe](https://github.com/vitejs/vite/commit/f6aa7fe401737ef584ccf34b6042a32b8e5e8c5d))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# [2.7.0-beta.9](https://github.com/vitejs/vite/compare/v2.7.0-beta.8...v2.7.0-beta.9) (2021-11-27)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* `isBuiltin` using patched native `builtinModules` ([#5827](https://github.com/vitejs/vite/issues/5827)) ([4a05a6e](https://github.com/vitejs/vite/commit/4a05a6e2f69c3a799fee651d182beeb176abfaac))
|
|
91
|
+
* always bundle config file, fix config hmr ([#5779](https://github.com/vitejs/vite/issues/5779)) ([19d2b6a](https://github.com/vitejs/vite/commit/19d2b6ab9cf2c5ba40f52c345f71d67f321c0776))
|
|
92
|
+
* build pluginContext types error ([#5846](https://github.com/vitejs/vite/issues/5846)) ([c278439](https://github.com/vitejs/vite/commit/c2784390ae4cfc1150b63c86a70a240f0f319967))
|
|
93
|
+
* circular dependency hmr causes refresh crash ([#4589](https://github.com/vitejs/vite/issues/4589)) ([00d8c9b](https://github.com/vitejs/vite/commit/00d8c9b7ffcfa2a3f888ef5752f57682cdea91b2))
|
|
94
|
+
* replace asset references in CSS returned to JS ([#5729](https://github.com/vitejs/vite/issues/5729)) ([880026e](https://github.com/vitejs/vite/commit/880026e414d5745233ff2b67799cd386001bddd8))
|
|
95
|
+
* resolve addons using nodeResolve() ([#5809](https://github.com/vitejs/vite/issues/5809)) ([d288772](https://github.com/vitejs/vite/commit/d2887729911d52e3117a7649e85460b346f04b54))
|
|
96
|
+
* throw full error causing preprocessor to not load ([#5816](https://github.com/vitejs/vite/issues/5816)) ([f6fcd21](https://github.com/vitejs/vite/commit/f6fcd2190e18f2ad20766a164411351b2220cf52))
|
|
97
|
+
* unicode path html entry point ([#5821](https://github.com/vitejs/vite/issues/5821)) ([#5823](https://github.com/vitejs/vite/issues/5823)) ([2048195](https://github.com/vitejs/vite/commit/20481950dce58e21d06d0d7da0325a3788e683c5))
|
|
98
|
+
* unminified build breaks __vitePreload ([#5785](https://github.com/vitejs/vite/issues/5785)) ([757a74a](https://github.com/vitejs/vite/commit/757a74aa41f3b12505557637daec2058423cfd23))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* lint for missing type="module" attribute ([#5837](https://github.com/vitejs/vite/issues/5837)) ([#5838](https://github.com/vitejs/vite/issues/5838)) ([494e358](https://github.com/vitejs/vite/commit/494e3586fef5865ddc99f3cff48856495c4373f1))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
1
107
|
# [2.7.0-beta.8](https://github.com/vitejs/vite/compare/v2.7.0-beta.7...v2.7.0-beta.8) (2021-11-19)
|
|
2
108
|
|
|
3
109
|
|
|
@@ -106,35 +212,6 @@
|
|
|
106
212
|
|
|
107
213
|
# [2.7.0-beta.0](https://github.com/vitejs/vite/compare/v2.6.13...v2.7.0-beta.0) (2021-10-28)
|
|
108
214
|
|
|
109
|
-
|
|
110
|
-
### BREAKING CHANGES
|
|
111
|
-
|
|
112
|
-
- `server.fs.strict` is `true` by default ([#5341](https://github.com/vitejs/vite/pull/5341))
|
|
113
|
-
See [server filesystem restriction docs](https://vitejs.dev/config/#server-fs-strict) for more details.
|
|
114
|
-
- Plugin hooks `ssr` param to object in `resolveId`, `load`, and `transform` ([#5253](https://github.com/vitejs/vite/pull/5253))
|
|
115
|
-
Previous to this release, the `ssr` param was passed as a `boolean` in the last parameter of each hook. The new interface for these hooks is now:
|
|
116
|
-
```ts
|
|
117
|
-
export interface Plugin extends RollupPlugin {
|
|
118
|
-
// ... other hooks
|
|
119
|
-
resolveId?(this: PluginContext, source: string, importer: string | undefined, options: {
|
|
120
|
-
custom?: CustomPluginOptions;
|
|
121
|
-
ssr?: boolean;
|
|
122
|
-
}): Promise<ResolveIdResult> | ResolveIdResult;
|
|
123
|
-
load?(this: PluginContext, id: string, options?: {
|
|
124
|
-
ssr?: boolean;
|
|
125
|
-
}): Promise<LoadResult> | LoadResult;
|
|
126
|
-
transform?(this: TransformPluginContext, code: string, id: string, options?: {
|
|
127
|
-
ssr?: boolean;
|
|
128
|
-
}): Promise<TransformResult> | TransformResult;
|
|
129
|
-
}
|
|
130
|
-
```
|
|
131
|
-
In your plugins, you can check if the last param is a boolean or an object to be backward compatible with 2.6 and give some time to users to migrate to Vite 2.7.
|
|
132
|
-
- `server.pluginContainer` options object for `resolveId`, `load`, and `transform` ([#5294](https://github.com/vitejs/vite/pull/5294))
|
|
133
|
-
- Normalize scripts and commands naming ([#5207](https://github.com/vitejs/vite/pull/5207))
|
|
134
|
-
Adds a new `vite dev` command alias for `vite serve`, preparing for the new release of create-vite where package scripts are renamed to `dev`, `build`, and `preview`.
|
|
135
|
-
- Align experimental `preview` api ([#5407](https://github.com/vitejs/vite/pull/5407))
|
|
136
|
-
This API was first introduced in 2.6 and it is still in flux.
|
|
137
|
-
|
|
138
215
|
### Bug Fixes
|
|
139
216
|
|
|
140
217
|
* add `import` support to `ssrModuleLoader` ([#5197](https://github.com/vitejs/vite/issues/5197)) ([baba1f9](https://github.com/vitejs/vite/commit/baba1f9e8fb22254b3858bcc1ffe89b334736068))
|
package/LICENSE.md
CHANGED
|
@@ -836,23 +836,6 @@ Repository: micromatch/braces
|
|
|
836
836
|
|
|
837
837
|
---------------------------------------
|
|
838
838
|
|
|
839
|
-
## builtin-modules
|
|
840
|
-
License: MIT
|
|
841
|
-
By: Sindre Sorhus
|
|
842
|
-
Repository: sindresorhus/builtin-modules
|
|
843
|
-
|
|
844
|
-
> MIT License
|
|
845
|
-
>
|
|
846
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
847
|
-
>
|
|
848
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
849
|
-
>
|
|
850
|
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
851
|
-
>
|
|
852
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
853
|
-
|
|
854
|
-
---------------------------------------
|
|
855
|
-
|
|
856
839
|
## bytes
|
|
857
840
|
License: MIT
|
|
858
841
|
By: TJ Holowaychuk, Jed Watson, Théo FIDRY
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { InlineConfig, ResolvedConfig } from './config';
|
|
2
|
+
import { Plugin, RollupOptions, RollupWarning, WarningHandler, RollupOutput, WatcherOptions, RollupWatcher, ModuleFormat } from 'rollup';
|
|
3
|
+
import { Terser } from 'types/terser';
|
|
4
|
+
import { RollupCommonJSOptions } from 'types/commonjs';
|
|
5
|
+
import { RollupDynamicImportVarsOptions } from 'types/dynamicImportVars';
|
|
6
|
+
import { TransformOptions } from 'esbuild';
|
|
7
|
+
export interface BuildOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Base public path when served in production.
|
|
10
|
+
* @deprecated `base` is now a root-level config option.
|
|
11
|
+
*/
|
|
12
|
+
base?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Compatibility transform target. The transform is performed with esbuild
|
|
15
|
+
* and the lowest supported target is es2015/es6. Note this only handles
|
|
16
|
+
* syntax transformation and does not cover polyfills (except for dynamic
|
|
17
|
+
* import)
|
|
18
|
+
*
|
|
19
|
+
* Default: 'modules' - Similar to `@babel/preset-env`'s targets.esmodules,
|
|
20
|
+
* transpile targeting browsers that natively support dynamic es module imports.
|
|
21
|
+
* https://caniuse.com/es6-module-dynamic-import
|
|
22
|
+
*
|
|
23
|
+
* Another special value is 'esnext' - which only performs minimal transpiling
|
|
24
|
+
* (for minification compat) and assumes native dynamic imports support.
|
|
25
|
+
*
|
|
26
|
+
* For custom targets, see https://esbuild.github.io/api/#target and
|
|
27
|
+
* https://esbuild.github.io/content-types/#javascript for more details.
|
|
28
|
+
*/
|
|
29
|
+
target?: 'modules' | TransformOptions['target'] | false;
|
|
30
|
+
/**
|
|
31
|
+
* whether to inject module preload polyfill.
|
|
32
|
+
* Note: does not apply to library mode.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
polyfillModulePreload?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* whether to inject dynamic import polyfill.
|
|
38
|
+
* Note: does not apply to library mode.
|
|
39
|
+
* @default false
|
|
40
|
+
* @deprecated use plugin-legacy for browsers that don't support dynamic import
|
|
41
|
+
*/
|
|
42
|
+
polyfillDynamicImport?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Directory relative from `root` where build output will be placed. If the
|
|
45
|
+
* directory exists, it will be removed before the build.
|
|
46
|
+
* @default 'dist'
|
|
47
|
+
*/
|
|
48
|
+
outDir?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Directory relative from `outDir` where the built js/css/image assets will
|
|
51
|
+
* be placed.
|
|
52
|
+
* @default 'assets'
|
|
53
|
+
*/
|
|
54
|
+
assetsDir?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Static asset files smaller than this number (in bytes) will be inlined as
|
|
57
|
+
* base64 strings. Default limit is `4096` (4kb). Set to `0` to disable.
|
|
58
|
+
* @default 4096
|
|
59
|
+
*/
|
|
60
|
+
assetsInlineLimit?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to code-split CSS. When enabled, CSS in async chunks will be
|
|
63
|
+
* inlined as strings in the chunk and inserted via dynamically created
|
|
64
|
+
* style tags when the chunk is loaded.
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
cssCodeSplit?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* An optional separate target for CSS minification.
|
|
70
|
+
* As esbuild only supports configuring targets to mainstream
|
|
71
|
+
* browsers, users may need this option when they are targeting
|
|
72
|
+
* a niche browser that comes with most modern JavaScript features
|
|
73
|
+
* but has poor CSS support, e.g. Android WeChat WebView, which
|
|
74
|
+
* doesn't support the #RGBA syntax.
|
|
75
|
+
*/
|
|
76
|
+
cssTarget?: TransformOptions['target'] | false;
|
|
77
|
+
/**
|
|
78
|
+
* If `true`, a separate sourcemap file will be created. If 'inline', the
|
|
79
|
+
* sourcemap will be appended to the resulting output file as data URI.
|
|
80
|
+
* 'hidden' works like `true` except that the corresponding sourcemap
|
|
81
|
+
* comments in the bundled files are suppressed.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
sourcemap?: boolean | 'inline' | 'hidden';
|
|
85
|
+
/**
|
|
86
|
+
* Set to `false` to disable minification, or specify the minifier to use.
|
|
87
|
+
* Available options are 'terser' or 'esbuild'.
|
|
88
|
+
* @default 'esbuild'
|
|
89
|
+
*/
|
|
90
|
+
minify?: boolean | 'terser' | 'esbuild';
|
|
91
|
+
/**
|
|
92
|
+
* Options for terser
|
|
93
|
+
* https://terser.org/docs/api-reference#minify-options
|
|
94
|
+
*/
|
|
95
|
+
terserOptions?: Terser.MinifyOptions;
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated Vite now uses esbuild for CSS minification.
|
|
98
|
+
*/
|
|
99
|
+
cleanCssOptions?: any;
|
|
100
|
+
/**
|
|
101
|
+
* Will be merged with internal rollup options.
|
|
102
|
+
* https://rollupjs.org/guide/en/#big-list-of-options
|
|
103
|
+
*/
|
|
104
|
+
rollupOptions?: RollupOptions;
|
|
105
|
+
/**
|
|
106
|
+
* Options to pass on to `@rollup/plugin-commonjs`
|
|
107
|
+
*/
|
|
108
|
+
commonjsOptions?: RollupCommonJSOptions;
|
|
109
|
+
/**
|
|
110
|
+
* Options to pass on to `@rollup/plugin-dynamic-import-vars`
|
|
111
|
+
*/
|
|
112
|
+
dynamicImportVarsOptions?: RollupDynamicImportVarsOptions;
|
|
113
|
+
/**
|
|
114
|
+
* Whether to write bundle to disk
|
|
115
|
+
* @default true
|
|
116
|
+
*/
|
|
117
|
+
write?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Empty outDir on write.
|
|
120
|
+
* @default true when outDir is a sub directory of project root
|
|
121
|
+
*/
|
|
122
|
+
emptyOutDir?: boolean | null;
|
|
123
|
+
/**
|
|
124
|
+
* Whether to emit a manifest.json under assets dir to map hash-less filenames
|
|
125
|
+
* to their hashed versions. Useful when you want to generate your own HTML
|
|
126
|
+
* instead of using the one generated by Vite.
|
|
127
|
+
*
|
|
128
|
+
* Example:
|
|
129
|
+
*
|
|
130
|
+
* ```json
|
|
131
|
+
* {
|
|
132
|
+
* "main.js": {
|
|
133
|
+
* "file": "main.68fe3fad.js",
|
|
134
|
+
* "css": "main.e6b63442.css",
|
|
135
|
+
* "imports": [...],
|
|
136
|
+
* "dynamicImports": [...]
|
|
137
|
+
* }
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
manifest?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Build in library mode. The value should be the global name of the lib in
|
|
145
|
+
* UMD mode. This will produce esm + cjs + umd bundle formats with default
|
|
146
|
+
* configurations that are suitable for distributing libraries.
|
|
147
|
+
*/
|
|
148
|
+
lib?: LibraryOptions | false;
|
|
149
|
+
/**
|
|
150
|
+
* Produce SSR oriented build. Note this requires specifying SSR entry via
|
|
151
|
+
* `rollupOptions.input`.
|
|
152
|
+
*/
|
|
153
|
+
ssr?: boolean | string;
|
|
154
|
+
/**
|
|
155
|
+
* Generate SSR manifest for determining style links and asset preload
|
|
156
|
+
* directives in production.
|
|
157
|
+
*/
|
|
158
|
+
ssrManifest?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Set to false to disable reporting compressed chunk sizes.
|
|
161
|
+
* Can slightly improve build speed.
|
|
162
|
+
*/
|
|
163
|
+
reportCompressedSize?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Set to false to disable brotli compressed size reporting for build.
|
|
166
|
+
* Can slightly improve build speed.
|
|
167
|
+
* @deprecated use `build.reportCompressedSize` instead.
|
|
168
|
+
*/
|
|
169
|
+
brotliSize?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Adjust chunk size warning limit (in kbs).
|
|
172
|
+
* @default 500
|
|
173
|
+
*/
|
|
174
|
+
chunkSizeWarningLimit?: number;
|
|
175
|
+
/**
|
|
176
|
+
* Rollup watch options
|
|
177
|
+
* https://rollupjs.org/guide/en/#watchoptions
|
|
178
|
+
*/
|
|
179
|
+
watch?: WatcherOptions | null;
|
|
180
|
+
}
|
|
181
|
+
export interface LibraryOptions {
|
|
182
|
+
entry: string;
|
|
183
|
+
name?: string;
|
|
184
|
+
formats?: LibraryFormats[];
|
|
185
|
+
fileName?: string | ((format: ModuleFormat) => string);
|
|
186
|
+
}
|
|
187
|
+
export declare type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife';
|
|
188
|
+
export declare type ResolvedBuildOptions = Required<Omit<BuildOptions, 'base' | 'cleanCssOptions' | 'polyfillDynamicImport' | 'brotliSize'>>;
|
|
189
|
+
export declare function resolveBuildOptions(root: string, raw?: BuildOptions): ResolvedBuildOptions;
|
|
190
|
+
export declare function resolveBuildPlugins(config: ResolvedConfig): {
|
|
191
|
+
pre: Plugin[];
|
|
192
|
+
post: Plugin[];
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Bundles the app for production.
|
|
196
|
+
* Returns a Promise containing the build result.
|
|
197
|
+
*/
|
|
198
|
+
export declare function build(inlineConfig?: InlineConfig): Promise<RollupOutput | RollupOutput[] | RollupWatcher>;
|
|
199
|
+
export declare function resolveLibFilename(libOptions: LibraryOptions, format: ModuleFormat, root: string): string;
|
|
200
|
+
export declare function onRollupWarning(warning: RollupWarning, warn: WarningHandler, config: ResolvedConfig): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var build = require('./dep-
|
|
3
|
+
var build = require('./dep-7817f5b4.js');
|
|
4
4
|
var require$$1 = require('crypto');
|
|
5
5
|
|
|
6
6
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
@@ -29179,4 +29179,4 @@ var index = /*#__PURE__*/_mergeNamespaces({
|
|
|
29179
29179
|
}, [selfsigned]);
|
|
29180
29180
|
|
|
29181
29181
|
exports.index = index;
|
|
29182
|
-
//# sourceMappingURL=dep-
|
|
29182
|
+
//# sourceMappingURL=dep-453486e7.js.map
|