vite 2.8.1 → 2.8.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/dist/node/chunks/{dep-b2698015.js → dep-15d13ae7.js} +1 -1
- package/dist/node/chunks/{dep-bd3a36cc.js → dep-333341a0.js} +1 -1
- package/dist/node/chunks/{dep-1412e872.js → dep-3d5f2596.js} +18 -7
- package/dist/node/chunks/{dep-71f3dcc6.js → dep-50851e02.js} +1 -1
- package/dist/node/cli.js +8 -7
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/package.json +2 -3
- package/types/importMeta.d.ts +4 -14
- package/CHANGELOG.md +0 -2835
|
@@ -2338,8 +2338,8 @@ function writeFile(filename, content) {
|
|
|
2338
2338
|
*/
|
|
2339
2339
|
function isFileReadable(filename) {
|
|
2340
2340
|
try {
|
|
2341
|
-
fs__default.
|
|
2342
|
-
return
|
|
2341
|
+
const stat = fs__default.statSync(filename, { throwIfNoEntry: false });
|
|
2342
|
+
return !!stat;
|
|
2343
2343
|
}
|
|
2344
2344
|
catch {
|
|
2345
2345
|
return false;
|
|
@@ -18880,7 +18880,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
|
|
|
18880
18880
|
replacer: urlReplacer
|
|
18881
18881
|
}));
|
|
18882
18882
|
if (isModule) {
|
|
18883
|
-
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-
|
|
18883
|
+
postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-50851e02.js'); }).then(function (n) { return n.index; })).default({
|
|
18884
18884
|
...modulesOptions,
|
|
18885
18885
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
18886
18886
|
modules = _modules;
|
|
@@ -21303,7 +21303,7 @@ const assetAttrsConfig = {
|
|
|
21303
21303
|
const isAsyncScriptMap = new WeakMap();
|
|
21304
21304
|
async function traverseHtml(html, filePath, visitor) {
|
|
21305
21305
|
// lazy load compiler
|
|
21306
|
-
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-
|
|
21306
|
+
const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-333341a0.js'); }).then(function (n) { return n.compilerDom_cjs; });
|
|
21307
21307
|
// @vue/compiler-core doesn't like lowercase doctypes
|
|
21308
21308
|
html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
|
|
21309
21309
|
try {
|
|
@@ -22788,7 +22788,9 @@ function manifestPlugin(config) {
|
|
|
22788
22788
|
const outputLength = Array.isArray(output) ? output.length : 1;
|
|
22789
22789
|
if (outputCount >= outputLength) {
|
|
22790
22790
|
this.emitFile({
|
|
22791
|
-
fileName:
|
|
22791
|
+
fileName: typeof config.build.manifest === 'string'
|
|
22792
|
+
? config.build.manifest
|
|
22793
|
+
: 'manifest.json',
|
|
22792
22794
|
type: 'asset',
|
|
22793
22795
|
source: JSON.stringify(manifest, null, 2)
|
|
22794
22796
|
});
|
|
@@ -29859,7 +29861,9 @@ function ssrManifestPlugin(config) {
|
|
|
29859
29861
|
}
|
|
29860
29862
|
}
|
|
29861
29863
|
this.emitFile({
|
|
29862
|
-
fileName:
|
|
29864
|
+
fileName: typeof config.build.ssrManifest === 'string'
|
|
29865
|
+
? config.build.ssrManifest
|
|
29866
|
+
: 'ssr-manifest.json',
|
|
29863
29867
|
type: 'asset',
|
|
29864
29868
|
source: JSON.stringify(ssrManifest, null, 2)
|
|
29865
29869
|
});
|
|
@@ -45044,7 +45048,7 @@ async function getCertificate(cacheDir) {
|
|
|
45044
45048
|
return content;
|
|
45045
45049
|
}
|
|
45046
45050
|
catch {
|
|
45047
|
-
const content = (await Promise.resolve().then(function () { return require('./dep-
|
|
45051
|
+
const content = (await Promise.resolve().then(function () { return require('./dep-15d13ae7.js'); })).createCertificate();
|
|
45048
45052
|
fs$n.promises
|
|
45049
45053
|
.mkdir(cacheDir, { recursive: true })
|
|
45050
45054
|
.then(() => fs$n.promises.writeFile(cachePath, content))
|
|
@@ -69540,6 +69544,12 @@ async function preview(inlineConfig) {
|
|
|
69540
69544
|
};
|
|
69541
69545
|
}
|
|
69542
69546
|
|
|
69547
|
+
var preview$1 = {
|
|
69548
|
+
__proto__: null,
|
|
69549
|
+
resolvePreviewOptions: resolvePreviewOptions,
|
|
69550
|
+
preview: preview
|
|
69551
|
+
};
|
|
69552
|
+
|
|
69543
69553
|
function matches(pattern, importee) {
|
|
69544
69554
|
if (pattern instanceof RegExp) {
|
|
69545
69555
|
return pattern.test(importee);
|
|
@@ -71479,6 +71489,7 @@ exports.mergeConfig = mergeConfig;
|
|
|
71479
71489
|
exports.normalizePath = normalizePath$4;
|
|
71480
71490
|
exports.optimizeDeps = optimizeDeps;
|
|
71481
71491
|
exports.preview = preview;
|
|
71492
|
+
exports.preview$1 = preview$1;
|
|
71482
71493
|
exports.printHttpServerUrls = printHttpServerUrls;
|
|
71483
71494
|
exports.resolveConfig = resolveConfig;
|
|
71484
71495
|
exports.resolveEnvPrefix = resolveEnvPrefix;
|
package/dist/node/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$0 = require('events');
|
|
4
|
-
var build = require('./chunks/dep-
|
|
4
|
+
var build = require('./chunks/dep-3d5f2596.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -683,7 +683,7 @@ cli
|
|
|
683
683
|
.action(async (root, options) => {
|
|
684
684
|
// output structure is preserved even after bundling so require()
|
|
685
685
|
// is ok here
|
|
686
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
686
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-3d5f2596.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -727,12 +727,12 @@ cli
|
|
|
727
727
|
.option('--sourcemap', `[boolean] output source maps for build (default: false)`)
|
|
728
728
|
.option('--minify [minifier]', `[boolean | "terser" | "esbuild"] enable/disable minification, ` +
|
|
729
729
|
`or specify minifier to use (default: esbuild)`)
|
|
730
|
-
.option('--manifest', `[boolean] emit build manifest json`)
|
|
731
|
-
.option('--ssrManifest', `[boolean] emit ssr manifest json`)
|
|
730
|
+
.option('--manifest [name]', `[boolean | string] emit build manifest json`)
|
|
731
|
+
.option('--ssrManifest [name]', `[boolean | string] emit ssr manifest json`)
|
|
732
732
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
733
733
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
734
734
|
.action(async (root, options) => {
|
|
735
|
-
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-3d5f2596.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build$1({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]')
|
|
756
756
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
757
757
|
.action(async (root, options) => {
|
|
758
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
758
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-3d5f2596.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -778,8 +778,9 @@ cli
|
|
|
778
778
|
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
779
779
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
780
780
|
.action(async (root, options) => {
|
|
781
|
+
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-3d5f2596.js'); }).then(function (n) { return n.preview$1; });
|
|
781
782
|
try {
|
|
782
|
-
const server = await
|
|
783
|
+
const server = await preview({
|
|
783
784
|
root,
|
|
784
785
|
base: options.base,
|
|
785
786
|
configFile: options.config,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -227,7 +227,7 @@ export declare interface BuildOptions {
|
|
|
227
227
|
* ```
|
|
228
228
|
* @default false
|
|
229
229
|
*/
|
|
230
|
-
manifest?: boolean;
|
|
230
|
+
manifest?: boolean | string;
|
|
231
231
|
/**
|
|
232
232
|
* Build in library mode. The value should be the global name of the lib in
|
|
233
233
|
* UMD mode. This will produce esm + cjs + umd bundle formats with default
|
|
@@ -243,7 +243,7 @@ export declare interface BuildOptions {
|
|
|
243
243
|
* Generate SSR manifest for determining style links and asset preload
|
|
244
244
|
* directives in production.
|
|
245
245
|
*/
|
|
246
|
-
ssrManifest?: boolean;
|
|
246
|
+
ssrManifest?: boolean | string;
|
|
247
247
|
/**
|
|
248
248
|
* Set to false to disable reporting compressed chunk sizes.
|
|
249
249
|
* Can slightly improve build speed.
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"roll-types": "api-extractor run && rimraf temp",
|
|
40
40
|
"lint": "eslint --ext .ts src/**",
|
|
41
41
|
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
|
|
42
|
-
"
|
|
43
|
-
"release": "ts-node ../../scripts/release.ts"
|
|
42
|
+
"prepublishOnly": "npm run build"
|
|
44
43
|
},
|
|
45
44
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
46
45
|
"dependencies": {
|
package/types/importMeta.d.ts
CHANGED
|
@@ -59,25 +59,15 @@ interface ImportMeta {
|
|
|
59
59
|
|
|
60
60
|
readonly env: ImportMetaEnv
|
|
61
61
|
|
|
62
|
-
glob(
|
|
62
|
+
glob<Module = { [key: string]: any }>(
|
|
63
63
|
pattern: string,
|
|
64
64
|
options?: AssertOptions
|
|
65
|
-
): Record<
|
|
66
|
-
string,
|
|
67
|
-
() => Promise<{
|
|
68
|
-
[key: string]: any
|
|
69
|
-
}>
|
|
70
|
-
>
|
|
65
|
+
): Record<string, () => Promise<Module>>
|
|
71
66
|
|
|
72
|
-
globEager(
|
|
67
|
+
globEager<Module = { [key: string]: any }>(
|
|
73
68
|
pattern: string,
|
|
74
69
|
options?: AssertOptions
|
|
75
|
-
): Record<
|
|
76
|
-
string,
|
|
77
|
-
{
|
|
78
|
-
[key: string]: any
|
|
79
|
-
}
|
|
80
|
-
>
|
|
70
|
+
): Record<string, Module>
|
|
81
71
|
}
|
|
82
72
|
|
|
83
73
|
interface ImportMetaEnv {
|