vite 2.8.2 → 2.8.3
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/LICENSE.md +0 -1
- package/dist/node/chunks/{dep-15d13ae7.js → dep-8a5027b8.js} +1 -1
- package/dist/node/chunks/{dep-50851e02.js → dep-cc251a32.js} +1 -1
- package/dist/node/chunks/{dep-333341a0.js → dep-d44e59ba.js} +1 -1
- package/dist/node/chunks/{dep-3d5f2596.js → dep-f9d9421a.js} +57 -70
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +1 -1
- package/package.json +2 -2
package/LICENSE.md
CHANGED
|
@@ -1241,7 +1241,6 @@ Repository: git://github.com/motdotla/dotenv.git
|
|
|
1241
1241
|
## dotenv-expand
|
|
1242
1242
|
License: BSD-2-Clause
|
|
1243
1243
|
By: motdotla
|
|
1244
|
-
Repository: https://github.com/motdotla/dotenv-expand
|
|
1245
1244
|
|
|
1246
1245
|
> Copyright (c) 2016, Scott Motte
|
|
1247
1246
|
> All rights reserved.
|
|
@@ -2177,7 +2177,7 @@ function injectQuery(url, queryToInject) {
|
|
|
2177
2177
|
pathname = pathname.slice(1);
|
|
2178
2178
|
}
|
|
2179
2179
|
pathname = decodeURIComponent(pathname);
|
|
2180
|
-
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${hash
|
|
2180
|
+
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${hash !== null && hash !== void 0 ? hash : ''}`;
|
|
2181
2181
|
}
|
|
2182
2182
|
const timestampRE = /\bt=\d{13}&?\b/;
|
|
2183
2183
|
function removeTimestampQuery(url) {
|
|
@@ -2415,7 +2415,7 @@ async function processSrcSet(srcs, replacer) {
|
|
|
2415
2415
|
};
|
|
2416
2416
|
}));
|
|
2417
2417
|
return ret.reduce((prev, { url, descriptor }, index) => {
|
|
2418
|
-
descriptor
|
|
2418
|
+
descriptor !== null && descriptor !== void 0 ? descriptor : (descriptor = '');
|
|
2419
2419
|
return (prev +=
|
|
2420
2420
|
url + ` ${descriptor}${index === ret.length - 1 ? '' : ', '}`);
|
|
2421
2421
|
}, '');
|
|
@@ -5668,7 +5668,7 @@ const append$1 = (queue = '', stash = '', enclose = false) => {
|
|
|
5668
5668
|
return utils$g.flatten(result);
|
|
5669
5669
|
};
|
|
5670
5670
|
|
|
5671
|
-
const expand$
|
|
5671
|
+
const expand$3 = (ast, options = {}) => {
|
|
5672
5672
|
let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
|
|
5673
5673
|
|
|
5674
5674
|
let walk = (node, parent = {}) => {
|
|
@@ -5748,7 +5748,7 @@ const expand$4 = (ast, options = {}) => {
|
|
|
5748
5748
|
return utils$g.flatten(walk(ast));
|
|
5749
5749
|
};
|
|
5750
5750
|
|
|
5751
|
-
var expand_1
|
|
5751
|
+
var expand_1 = expand$3;
|
|
5752
5752
|
|
|
5753
5753
|
var constants$6 = {
|
|
5754
5754
|
MAX_LENGTH: 1024 * 64,
|
|
@@ -6137,7 +6137,7 @@ var parse_1$2 = parse$m;
|
|
|
6137
6137
|
|
|
6138
6138
|
const stringify$4 = stringify$8;
|
|
6139
6139
|
const compile = compile_1;
|
|
6140
|
-
const expand$
|
|
6140
|
+
const expand$2 = expand_1;
|
|
6141
6141
|
const parse$l = parse_1$2;
|
|
6142
6142
|
|
|
6143
6143
|
/**
|
|
@@ -6257,7 +6257,7 @@ braces$2.expand = (input, options = {}) => {
|
|
|
6257
6257
|
input = braces$2.parse(input, options);
|
|
6258
6258
|
}
|
|
6259
6259
|
|
|
6260
|
-
let result = expand$
|
|
6260
|
+
let result = expand$2(input, options);
|
|
6261
6261
|
|
|
6262
6262
|
// filter out empty strings if specified
|
|
6263
6263
|
if (options.noempty === true) {
|
|
@@ -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-cc251a32.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-d44e59ba.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 {
|
|
@@ -23692,7 +23692,7 @@ function expandTop(str) {
|
|
|
23692
23692
|
str = '\\{\\}' + str.substr(2);
|
|
23693
23693
|
}
|
|
23694
23694
|
|
|
23695
|
-
return expand$
|
|
23695
|
+
return expand$1(escapeBraces(str), true).map(unescapeBraces);
|
|
23696
23696
|
}
|
|
23697
23697
|
|
|
23698
23698
|
function embrace(str) {
|
|
@@ -23709,7 +23709,7 @@ function gte(i, y) {
|
|
|
23709
23709
|
return i >= y;
|
|
23710
23710
|
}
|
|
23711
23711
|
|
|
23712
|
-
function expand$
|
|
23712
|
+
function expand$1(str, isTop) {
|
|
23713
23713
|
var expansions = [];
|
|
23714
23714
|
|
|
23715
23715
|
var m = balanced('{', '}', str);
|
|
@@ -23723,7 +23723,7 @@ function expand$2(str, isTop) {
|
|
|
23723
23723
|
// {a},b}
|
|
23724
23724
|
if (m.post.match(/,.*\}/)) {
|
|
23725
23725
|
str = m.pre + '{' + m.body + escClose + m.post;
|
|
23726
|
-
return expand$
|
|
23726
|
+
return expand$1(str);
|
|
23727
23727
|
}
|
|
23728
23728
|
return [str];
|
|
23729
23729
|
}
|
|
@@ -23735,10 +23735,10 @@ function expand$2(str, isTop) {
|
|
|
23735
23735
|
n = parseCommaParts(m.body);
|
|
23736
23736
|
if (n.length === 1) {
|
|
23737
23737
|
// x{{a,b}}y ==> x{a}y x{b}y
|
|
23738
|
-
n = expand$
|
|
23738
|
+
n = expand$1(n[0], false).map(embrace);
|
|
23739
23739
|
if (n.length === 1) {
|
|
23740
23740
|
var post = m.post.length
|
|
23741
|
-
? expand$
|
|
23741
|
+
? expand$1(m.post, false)
|
|
23742
23742
|
: [''];
|
|
23743
23743
|
return post.map(function(p) {
|
|
23744
23744
|
return m.pre + n[0] + p;
|
|
@@ -23753,7 +23753,7 @@ function expand$2(str, isTop) {
|
|
|
23753
23753
|
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
23754
23754
|
var pre = m.pre;
|
|
23755
23755
|
var post = m.post.length
|
|
23756
|
-
? expand$
|
|
23756
|
+
? expand$1(m.post, false)
|
|
23757
23757
|
: [''];
|
|
23758
23758
|
|
|
23759
23759
|
var N;
|
|
@@ -23797,7 +23797,7 @@ function expand$2(str, isTop) {
|
|
|
23797
23797
|
N.push(c);
|
|
23798
23798
|
}
|
|
23799
23799
|
} else {
|
|
23800
|
-
N = concatMap(n, function(el) { return expand$
|
|
23800
|
+
N = concatMap(n, function(el) { return expand$1(el, false) });
|
|
23801
23801
|
}
|
|
23802
23802
|
|
|
23803
23803
|
for (var j = 0; j < N.length; j++) {
|
|
@@ -23820,7 +23820,7 @@ try {
|
|
|
23820
23820
|
} catch (er) {}
|
|
23821
23821
|
|
|
23822
23822
|
var GLOBSTAR$1 = minimatch$3.GLOBSTAR = Minimatch$1.GLOBSTAR = {};
|
|
23823
|
-
var expand
|
|
23823
|
+
var expand = braceExpansion;
|
|
23824
23824
|
|
|
23825
23825
|
var plTypes = {
|
|
23826
23826
|
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
|
@@ -24065,7 +24065,7 @@ function braceExpand (pattern, options) {
|
|
|
24065
24065
|
return [pattern]
|
|
24066
24066
|
}
|
|
24067
24067
|
|
|
24068
|
-
return expand
|
|
24068
|
+
return expand(pattern)
|
|
24069
24069
|
}
|
|
24070
24070
|
|
|
24071
24071
|
// parse a component of the expanded set.
|
|
@@ -29788,6 +29788,7 @@ function ssrManifestPlugin(config) {
|
|
|
29788
29788
|
return {
|
|
29789
29789
|
name: 'vite:ssr-manifest',
|
|
29790
29790
|
generateBundle(_options, bundle) {
|
|
29791
|
+
var _a;
|
|
29791
29792
|
for (const file in bundle) {
|
|
29792
29793
|
const chunk = bundle[file];
|
|
29793
29794
|
if (chunk.type === 'chunk') {
|
|
@@ -29799,7 +29800,7 @@ function ssrManifestPlugin(config) {
|
|
|
29799
29800
|
const assetFiles = chunkToEmittedAssetsMap.get(chunk);
|
|
29800
29801
|
for (const id in chunk.modules) {
|
|
29801
29802
|
const normalizedId = normalizePath$4(path$r.relative(config.root, id));
|
|
29802
|
-
const mappedChunks = ssrManifest[normalizedId]
|
|
29803
|
+
const mappedChunks = (_a = ssrManifest[normalizedId]) !== null && _a !== void 0 ? _a : (ssrManifest[normalizedId] = []);
|
|
29803
29804
|
if (!chunk.isEntry) {
|
|
29804
29805
|
mappedChunks.push(base + chunk.fileName);
|
|
29805
29806
|
}
|
|
@@ -45048,7 +45049,7 @@ async function getCertificate(cacheDir) {
|
|
|
45048
45049
|
return content;
|
|
45049
45050
|
}
|
|
45050
45051
|
catch {
|
|
45051
|
-
const content = (await Promise.resolve().then(function () { return require('./dep-
|
|
45052
|
+
const content = (await Promise.resolve().then(function () { return require('./dep-8a5027b8.js'); })).createCertificate();
|
|
45052
45053
|
fs$n.promises
|
|
45053
45054
|
.mkdir(cacheDir, { recursive: true })
|
|
45054
45055
|
.then(() => fs$n.promises.writeFile(cachePath, content))
|
|
@@ -55956,7 +55957,7 @@ function ssrRewriteStacktrace(stack, moduleGraph) {
|
|
|
55956
55957
|
.split('\n')
|
|
55957
55958
|
.map((line) => {
|
|
55958
55959
|
return line.replace(/^ {4}at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?)\)?/, (input, varName, url, line, column) => {
|
|
55959
|
-
var _a;
|
|
55960
|
+
var _a, _b, _c;
|
|
55960
55961
|
if (!url)
|
|
55961
55962
|
return input;
|
|
55962
55963
|
const mod = moduleGraph.urlToModuleMap.get(url);
|
|
@@ -55973,7 +55974,7 @@ function ssrRewriteStacktrace(stack, moduleGraph) {
|
|
|
55973
55974
|
if (!pos.source) {
|
|
55974
55975
|
return input;
|
|
55975
55976
|
}
|
|
55976
|
-
const source = `${pos.source}:${pos.line
|
|
55977
|
+
const source = `${pos.source}:${(_b = pos.line) !== null && _b !== void 0 ? _b : 0}:${(_c = pos.column) !== null && _c !== void 0 ? _c : 0}`;
|
|
55977
55978
|
if (!varName || varName === 'eval') {
|
|
55978
55979
|
return ` at ${source}`;
|
|
55979
55980
|
}
|
|
@@ -70625,7 +70626,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
|
|
70625
70626
|
].filter(Boolean);
|
|
70626
70627
|
}
|
|
70627
70628
|
|
|
70628
|
-
var main = {exports: {}};
|
|
70629
|
+
var main$1 = {exports: {}};
|
|
70629
70630
|
|
|
70630
70631
|
const fs = fs__default;
|
|
70631
70632
|
const path = path__default;
|
|
@@ -70766,70 +70767,56 @@ const DotenvModule = {
|
|
|
70766
70767
|
parse
|
|
70767
70768
|
};
|
|
70768
70769
|
|
|
70769
|
-
main.exports.config = DotenvModule.config;
|
|
70770
|
-
main.exports.parse = DotenvModule.parse;
|
|
70771
|
-
main.exports = DotenvModule;
|
|
70770
|
+
main$1.exports.config = DotenvModule.config;
|
|
70771
|
+
main$1.exports.parse = DotenvModule.parse;
|
|
70772
|
+
main$1.exports = DotenvModule;
|
|
70772
70773
|
|
|
70773
|
-
var dotenv = main.exports;
|
|
70774
|
+
var dotenv = main$1.exports;
|
|
70774
70775
|
|
|
70775
|
-
|
|
70776
|
-
|
|
70776
|
+
var dotenvExpand = function (config) {
|
|
70777
|
+
// if ignoring process.env, use a blank object
|
|
70778
|
+
var environment = config.ignoreProcessEnv ? {} : process.env;
|
|
70777
70779
|
|
|
70778
|
-
|
|
70779
|
-
|
|
70780
|
-
if (!parts || parts.length === 0) {
|
|
70781
|
-
return newEnv
|
|
70782
|
-
}
|
|
70780
|
+
var interpolate = function (envValue) {
|
|
70781
|
+
var matches = envValue.match(/(.?\${?(?:[a-zA-Z0-9_]+)?}?)/g) || [];
|
|
70783
70782
|
|
|
70784
|
-
|
|
70783
|
+
return matches.reduce(function (newEnv, match) {
|
|
70784
|
+
var parts = /(.?)\${?([a-zA-Z0-9_]+)?}?/g.exec(match);
|
|
70785
|
+
var prefix = parts[1];
|
|
70785
70786
|
|
|
70786
|
-
|
|
70787
|
+
var value, replacePart;
|
|
70787
70788
|
|
|
70788
|
-
|
|
70789
|
-
|
|
70790
|
-
|
|
70791
|
-
|
|
70792
|
-
|
|
70793
|
-
|
|
70794
|
-
|
|
70795
|
-
|
|
70796
|
-
value = Object.prototype.hasOwnProperty.call(environment, key)
|
|
70797
|
-
? environment[key]
|
|
70798
|
-
: (config.parsed[key] || keyParts[1] || '');
|
|
70799
|
-
|
|
70800
|
-
// If the value is found, remove nested expansions.
|
|
70801
|
-
if (keyParts.length > 1 && value) {
|
|
70802
|
-
const replaceNested = matches[index + 1];
|
|
70803
|
-
matches[index + 1] = '';
|
|
70804
|
-
|
|
70805
|
-
newEnv = newEnv.replace(replaceNested, '');
|
|
70806
|
-
}
|
|
70807
|
-
// Resolve recursive interpolations
|
|
70808
|
-
value = _interpolate(value, environment, config);
|
|
70809
|
-
}
|
|
70789
|
+
if (prefix === '\\') {
|
|
70790
|
+
replacePart = parts[0];
|
|
70791
|
+
value = replacePart.replace('\\$', '$');
|
|
70792
|
+
} else {
|
|
70793
|
+
var key = parts[2];
|
|
70794
|
+
replacePart = parts[0].substring(prefix.length);
|
|
70795
|
+
// process.env value 'wins' over .env file's value
|
|
70796
|
+
value = environment.hasOwnProperty(key) ? environment[key] : (config.parsed[key] || '');
|
|
70810
70797
|
|
|
70811
|
-
|
|
70812
|
-
|
|
70813
|
-
}
|
|
70798
|
+
// Resolve recursive interpolations
|
|
70799
|
+
value = interpolate(value);
|
|
70800
|
+
}
|
|
70814
70801
|
|
|
70815
|
-
|
|
70816
|
-
|
|
70817
|
-
|
|
70802
|
+
return newEnv.replace(replacePart, value)
|
|
70803
|
+
}, envValue)
|
|
70804
|
+
};
|
|
70818
70805
|
|
|
70819
|
-
for (
|
|
70820
|
-
|
|
70806
|
+
for (var configKey in config.parsed) {
|
|
70807
|
+
var value = environment.hasOwnProperty(configKey) ? environment[configKey] : config.parsed[configKey];
|
|
70821
70808
|
|
|
70822
|
-
config.parsed[configKey] =
|
|
70809
|
+
config.parsed[configKey] = interpolate(value);
|
|
70823
70810
|
}
|
|
70824
70811
|
|
|
70825
|
-
for (
|
|
70812
|
+
for (var processKey in config.parsed) {
|
|
70826
70813
|
environment[processKey] = config.parsed[processKey];
|
|
70827
70814
|
}
|
|
70828
70815
|
|
|
70829
70816
|
return config
|
|
70830
|
-
}
|
|
70817
|
+
};
|
|
70831
70818
|
|
|
70832
|
-
var
|
|
70819
|
+
var main = dotenvExpand;
|
|
70833
70820
|
|
|
70834
70821
|
const debug = createDebugger('vite:config');
|
|
70835
70822
|
/**
|
|
@@ -71443,7 +71430,7 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
|
71443
71430
|
debug: ((_a = process.env.DEBUG) === null || _a === void 0 ? void 0 : _a.includes('vite:dotenv')) || undefined
|
|
71444
71431
|
});
|
|
71445
71432
|
// let environment variables use each other
|
|
71446
|
-
|
|
71433
|
+
main({
|
|
71447
71434
|
parsed,
|
|
71448
71435
|
// prevent process.env mutation
|
|
71449
71436
|
ignoreProcessEnv: true
|
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-f9d9421a.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-f9d9421a.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -732,7 +732,7 @@ cli
|
|
|
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-f9d9421a.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-f9d9421a.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -778,7 +778,7 @@ 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-
|
|
781
|
+
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-f9d9421a.js'); }).then(function (n) { return n.preview$1; });
|
|
782
782
|
try {
|
|
783
783
|
const server = await preview({
|
|
784
784
|
root,
|
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.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"cross-spawn": "^7.0.3",
|
|
88
88
|
"debug": "^4.3.3",
|
|
89
89
|
"dotenv": "^14.3.2",
|
|
90
|
-
"dotenv-expand": "^
|
|
90
|
+
"dotenv-expand": "^5.1.0",
|
|
91
91
|
"es-module-lexer": "^0.9.3",
|
|
92
92
|
"estree-walker": "^2.0.2",
|
|
93
93
|
"etag": "^1.8.1",
|