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.

@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var build = require('./dep-e0fe87f8.js');
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.substring(lastIndex, index);
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.substring(lastIndex, index) : html;
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.substr(offset, length);
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.substr(1);
2019
+ content = content.slice(1);
2031
2020
  }
2032
2021
  else {
2033
- content = content.substr(1, content.length - 2);
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].substr(1).split('.') : [];
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.substr(2, tag.length).toLowerCase() === tag.toLowerCase() &&
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[0].toLowerCase() + tag.slice(1) === 'component';
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.substr(1, length);
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-66b16601.js.map
8723
+ //# sourceMappingURL=dep-e176e7bc.js.map