vite 2.6.14 → 2.7.0-beta.11
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 +191 -4
- package/LICENSE.md +2635 -31
- package/dist/client/client.mjs +1 -3
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-c98c5b6d.js → dep-156d979b.js} +4 -4
- package/dist/node/chunks/dep-156d979b.js.map +1 -0
- package/dist/node/chunks/{dep-e39b05d6.js → dep-58399509.js} +3 -3
- package/dist/node/chunks/dep-58399509.js.map +1 -0
- package/dist/node/chunks/{dep-7113cb3d.js → dep-c011d901.js} +4 -4
- package/dist/node/chunks/{dep-7113cb3d.js.map → dep-c011d901.js.map} +1 -1
- package/dist/node/chunks/{dep-e0fe87f8.js → dep-ce1019e0.js} +6303 -15936
- package/dist/node/chunks/dep-ce1019e0.js.map +1 -0
- package/dist/node/chunks/{dep-66b16601.js → dep-e176e7bc.js} +14 -25
- package/dist/node/chunks/dep-e176e7bc.js.map +1 -0
- package/dist/node/cli.js +34 -33
- package/dist/node/cli.js.map +1 -1
- package/dist/node/index.d.ts +181 -73
- package/dist/node/index.js +16 -16
- package/dist/node/terser.js +186 -54
- package/package.json +32 -33
- package/src/client/client.ts +2 -6
- package/types/commonjs.d.ts +22 -2
- package/types/shims.d.ts +6 -3
- package/dist/node/chunks/dep-66b16601.js.map +0 -1
- package/dist/node/chunks/dep-c98c5b6d.js.map +0 -1
- package/dist/node/chunks/dep-e0fe87f8.js.map +0 -1
- package/dist/node/chunks/dep-e39b05d6.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var build = require('./dep-
|
|
3
|
+
var build = require('./dep-ce1019e0.js');
|
|
4
4
|
|
|
5
5
|
function _mergeNamespaces(n, m) {
|
|
6
6
|
for (var i = 0; i < m.length; i++) {
|
|
7
7
|
var e = m[i];
|
|
8
|
-
for (var k in e) {
|
|
8
|
+
if (typeof e !== 'string' && !Array.isArray(e)) { for (var k in e) {
|
|
9
9
|
if (k !== 'default' && !(k in n)) {
|
|
10
10
|
n[k] = e[k];
|
|
11
11
|
}
|
|
12
|
-
}
|
|
12
|
+
} }
|
|
13
13
|
}
|
|
14
14
|
return n;
|
|
15
15
|
}
|
|
@@ -376,12 +376,12 @@ function escapeHtml(string) {
|
|
|
376
376
|
continue;
|
|
377
377
|
}
|
|
378
378
|
if (lastIndex !== index) {
|
|
379
|
-
html += str.
|
|
379
|
+
html += str.slice(lastIndex, index);
|
|
380
380
|
}
|
|
381
381
|
lastIndex = index + 1;
|
|
382
382
|
html += escaped;
|
|
383
383
|
}
|
|
384
|
-
return lastIndex !== index ? html + str.
|
|
384
|
+
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
385
385
|
}
|
|
386
386
|
// https://www.w3.org/TR/html52/syntax.html#comments
|
|
387
387
|
const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
@@ -476,17 +476,6 @@ const replacer = (_key, val) => {
|
|
|
476
476
|
return val;
|
|
477
477
|
};
|
|
478
478
|
|
|
479
|
-
/**
|
|
480
|
-
* List of @babel/parser plugins that are used for template expression
|
|
481
|
-
* transforms and SFC script transforms. By default we enable proposals slated
|
|
482
|
-
* for ES2020. This will need to be updated as the spec moves forward.
|
|
483
|
-
* Full list at https://babeljs.io/docs/en/next/babel-parser#plugins
|
|
484
|
-
*/
|
|
485
|
-
const babelParserDefaultPlugins = [
|
|
486
|
-
'bigInt',
|
|
487
|
-
'optionalChaining',
|
|
488
|
-
'nullishCoalescingOperator'
|
|
489
|
-
];
|
|
490
479
|
const EMPTY_OBJ = (process.env.NODE_ENV !== 'production')
|
|
491
480
|
? Object.freeze({})
|
|
492
481
|
: {};
|
|
@@ -603,7 +592,6 @@ var shared_esmBundler = {
|
|
|
603
592
|
NO: NO,
|
|
604
593
|
NOOP: NOOP,
|
|
605
594
|
PatchFlagNames: PatchFlagNames,
|
|
606
|
-
babelParserDefaultPlugins: babelParserDefaultPlugins,
|
|
607
595
|
camelize: camelize$1,
|
|
608
596
|
capitalize: capitalize,
|
|
609
597
|
def: def,
|
|
@@ -1110,7 +1098,7 @@ const isMemberExpressionNode = NOOP
|
|
|
1110
1098
|
const isMemberExpression = isMemberExpressionBrowser
|
|
1111
1099
|
;
|
|
1112
1100
|
function getInnerRange(loc, offset, length) {
|
|
1113
|
-
const source = loc.source.
|
|
1101
|
+
const source = loc.source.slice(offset, offset + length);
|
|
1114
1102
|
const newLoc = {
|
|
1115
1103
|
source,
|
|
1116
1104
|
start: advancePositionWithClone(loc.start, loc.source, offset),
|
|
@@ -1870,6 +1858,7 @@ function parseTag(context, type, parent) {
|
|
|
1870
1858
|
}
|
|
1871
1859
|
if (hasIf && hasFor) {
|
|
1872
1860
|
warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
|
|
1861
|
+
break;
|
|
1873
1862
|
}
|
|
1874
1863
|
}
|
|
1875
1864
|
}
|
|
@@ -2027,10 +2016,10 @@ function parseAttribute(context, nameSet) {
|
|
|
2027
2016
|
isStatic = false;
|
|
2028
2017
|
if (!content.endsWith(']')) {
|
|
2029
2018
|
emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
|
|
2030
|
-
content = content.
|
|
2019
|
+
content = content.slice(1);
|
|
2031
2020
|
}
|
|
2032
2021
|
else {
|
|
2033
|
-
content = content.
|
|
2022
|
+
content = content.slice(1, content.length - 1);
|
|
2034
2023
|
}
|
|
2035
2024
|
}
|
|
2036
2025
|
else if (isSlot) {
|
|
@@ -2056,7 +2045,7 @@ function parseAttribute(context, nameSet) {
|
|
|
2056
2045
|
valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
|
|
2057
2046
|
valueLoc.source = valueLoc.source.slice(1, -1);
|
|
2058
2047
|
}
|
|
2059
|
-
const modifiers = match[3] ? match[3].
|
|
2048
|
+
const modifiers = match[3] ? match[3].slice(1).split('.') : [];
|
|
2060
2049
|
if (isPropShorthand)
|
|
2061
2050
|
modifiers.push('prop');
|
|
2062
2051
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
@@ -2277,7 +2266,7 @@ function isEnd(context, mode, ancestors) {
|
|
|
2277
2266
|
}
|
|
2278
2267
|
function startsWithEndTagOpen(source, tag) {
|
|
2279
2268
|
return (startsWith(source, '</') &&
|
|
2280
|
-
source.
|
|
2269
|
+
source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
|
|
2281
2270
|
/[\t\r\n\f />]/.test(source[2 + tag.length] || '>'));
|
|
2282
2271
|
}
|
|
2283
2272
|
|
|
@@ -4865,7 +4854,7 @@ function stringifyDynamicPropNames(props) {
|
|
|
4865
4854
|
return propsNamesString + `]`;
|
|
4866
4855
|
}
|
|
4867
4856
|
function isComponentTag(tag) {
|
|
4868
|
-
return tag
|
|
4857
|
+
return tag === 'component' || tag === 'Component';
|
|
4869
4858
|
}
|
|
4870
4859
|
|
|
4871
4860
|
(process.env.NODE_ENV !== 'production')
|
|
@@ -7933,7 +7922,7 @@ const decodeHtml = (rawText, asAttr) => {
|
|
|
7933
7922
|
maxCRNameLength = Object.keys(namedCharacterReferences).reduce((max, name) => Math.max(max, name.length), 0);
|
|
7934
7923
|
}
|
|
7935
7924
|
for (let length = maxCRNameLength; !value && length > 0; --length) {
|
|
7936
|
-
name = rawText.
|
|
7925
|
+
name = rawText.slice(1, 1 + length);
|
|
7937
7926
|
value = namedCharacterReferences[name];
|
|
7938
7927
|
}
|
|
7939
7928
|
if (value) {
|
|
@@ -8731,4 +8720,4 @@ var compilerDom_cjs$1 = /*#__PURE__*/_mergeNamespaces({
|
|
|
8731
8720
|
}, [compilerDom_cjs$2]);
|
|
8732
8721
|
|
|
8733
8722
|
exports.compilerDom_cjs = compilerDom_cjs$1;
|
|
8734
|
-
//# sourceMappingURL=dep-
|
|
8723
|
+
//# sourceMappingURL=dep-e176e7bc.js.map
|