vite 3.0.0-alpha.1 → 3.0.0-alpha.4

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.
Files changed (92) hide show
  1. package/LICENSE.md +1 -1
  2. package/bin/vite.js +5 -5
  3. package/client.d.ts +4 -2
  4. package/dist/client/client.mjs +23 -19
  5. package/dist/client/client.mjs.map +1 -1
  6. package/dist/node/build.d.ts +178 -0
  7. package/dist/node/certificate.d.ts +2 -0
  8. package/dist/node/chunks/{dep-a9015192.js → dep-24157481.js} +20 -20
  9. package/dist/node/chunks/{dep-8db43f98.js → dep-28f8c91c.js} +27 -29
  10. package/dist/node/chunks/{dep-99df5764.js → dep-35b61ee3.js} +12 -6
  11. package/dist/node/chunks/{dep-5cb039d6.js → dep-aea1d487.js} +1608 -1701
  12. package/dist/node/chunks/{dep-88b8fd2c.js → dep-ce833324.js} +40 -37
  13. package/dist/node/chunks/{dep-2056ae8a.js → dep-e8ca8d40.js} +9 -3
  14. package/dist/node/cli.d.ts +1 -0
  15. package/dist/node/cli.js +43 -48
  16. package/dist/node/config.d.ts +240 -0
  17. package/dist/node/constants.d.ts +35 -0
  18. package/dist/node/constants.js +82 -0
  19. package/dist/node/env.d.ts +3 -0
  20. package/dist/node/http.d.ts +88 -0
  21. package/dist/node/index.d.ts +28 -3
  22. package/dist/node/index.js +37 -60
  23. package/dist/node/logger.d.ts +31 -0
  24. package/dist/node/optimizer/esbuildDepPlugin.d.ts +4 -0
  25. package/dist/node/optimizer/index.d.ts +167 -0
  26. package/dist/node/optimizer/registerMissing.d.ts +3 -0
  27. package/dist/node/optimizer/scan.d.ts +8 -0
  28. package/dist/node/packages.d.ts +27 -0
  29. package/dist/node/plugin.d.ts +129 -0
  30. package/dist/node/plugins/asset.d.ts +68 -0
  31. package/dist/node/plugins/assetImportMetaUrl.d.ts +13 -0
  32. package/dist/node/plugins/clientInjections.d.ts +7 -0
  33. package/dist/node/plugins/css.d.ts +86 -0
  34. package/dist/node/plugins/dataUri.d.ts +5 -0
  35. package/dist/node/plugins/define.d.ts +3 -0
  36. package/dist/node/plugins/dynamicImportVars.d.ts +9 -0
  37. package/dist/node/plugins/ensureWatch.d.ts +5 -0
  38. package/dist/node/plugins/esbuild.d.ts +15 -0
  39. package/dist/node/plugins/html.d.ts +120 -0
  40. package/dist/node/plugins/importAnalysis.d.ts +47 -0
  41. package/dist/node/plugins/importAnalysisBuild.d.ts +16 -0
  42. package/dist/node/plugins/importMetaGlob.d.ts +34 -0
  43. package/dist/node/plugins/index.d.ts +3 -0
  44. package/dist/node/plugins/json.d.ts +23 -0
  45. package/dist/node/plugins/loadFallback.d.ts +5 -0
  46. package/dist/node/plugins/manifest.d.ts +14 -0
  47. package/dist/node/plugins/metadata.d.ts +9 -0
  48. package/dist/node/plugins/modulePreloadPolyfill.d.ts +4 -0
  49. package/dist/node/plugins/optimizedDeps.d.ts +4 -0
  50. package/dist/node/plugins/preAlias.d.ts +5 -0
  51. package/dist/node/plugins/reporter.d.ts +3 -0
  52. package/dist/node/plugins/resolve.d.ts +39 -0
  53. package/dist/node/plugins/splitVendorChunk.d.ts +12 -0
  54. package/dist/node/plugins/ssrRequireHook.d.ts +12 -0
  55. package/dist/node/plugins/terser.d.ts +3 -0
  56. package/dist/node/plugins/wasm.d.ts +4 -0
  57. package/dist/node/plugins/worker.d.ts +9 -0
  58. package/dist/node/plugins/workerImportMetaUrl.d.ts +3 -0
  59. package/dist/node/preview.d.ts +33 -0
  60. package/dist/node/publicUtils.d.ts +11 -0
  61. package/dist/node/server/hmr.d.ts +39 -0
  62. package/dist/node/server/index.d.ts +198 -0
  63. package/dist/node/server/middlewares/base.d.ts +3 -0
  64. package/dist/node/server/middlewares/compression.d.ts +1 -0
  65. package/dist/node/server/middlewares/error.d.ts +8 -0
  66. package/dist/node/server/middlewares/indexHtml.d.ts +4 -0
  67. package/dist/node/server/middlewares/proxy.d.ts +20 -0
  68. package/dist/node/server/middlewares/spaFallback.d.ts +2 -0
  69. package/dist/node/server/middlewares/static.d.ts +6 -0
  70. package/dist/node/server/middlewares/time.d.ts +2 -0
  71. package/dist/node/server/middlewares/transform.d.ts +3 -0
  72. package/dist/node/server/moduleGraph.d.ts +55 -0
  73. package/dist/node/server/openBrowser.d.ts +15 -0
  74. package/dist/node/server/pluginContainer.d.ts +41 -0
  75. package/dist/node/server/searchRoot.d.ts +8 -0
  76. package/dist/node/server/send.d.ts +10 -0
  77. package/dist/node/server/sourcemap.d.ts +11 -0
  78. package/dist/node/server/transformRequest.d.ts +14 -0
  79. package/dist/node/server/ws.d.ts +55 -0
  80. package/dist/node/ssr/ssrExternal.d.ts +11 -0
  81. package/dist/node/ssr/ssrManifestPlugin.d.ts +3 -0
  82. package/dist/node/ssr/ssrModuleLoader.d.ts +7 -0
  83. package/dist/node/ssr/ssrStacktrace.d.ts +3 -0
  84. package/dist/node/ssr/ssrTransform.d.ts +14 -0
  85. package/dist/node/utils.d.ts +144 -0
  86. package/dist/node-cjs/publicUtils.cjs +2047 -0
  87. package/dist/{node/terser.js → node-cjs/terser.cjs} +0 -0
  88. package/index.cjs +33 -0
  89. package/package.json +24 -6
  90. package/src/client/client.ts +22 -16
  91. package/src/client/tsconfig.json +1 -1
  92. package/types/importGlob.d.ts +1 -3
@@ -1,15 +1,19 @@
1
- 'use strict';
2
-
3
- var require$$0 = require('postcss');
4
- var index$1 = require('./dep-5cb039d6.js');
5
- var path$2 = require('path');
6
- var require$$1 = require('crypto');
7
- var fs = require('fs');
8
- var require$$0$1 = require('util');
9
- var index$2 = require('./dep-2056ae8a.js');
10
-
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
12
-
1
+ import require$$0 from 'postcss';
2
+ import { v as commonjsGlobal } from './dep-aea1d487.js';
3
+ import path$2 from 'path';
4
+ import require$$1 from 'crypto';
5
+ import fs__default from 'fs';
6
+ import require$$0$1 from 'util';
7
+ import { l as lib$1 } from './dep-e8ca8d40.js';
8
+
9
+ import { fileURLToPath as __cjs_fileURLToPath } from 'url';
10
+ import { dirname as __cjs_dirname } from 'path';
11
+ import { createRequire as __cjs_createRequire } from 'module';
12
+
13
+ const __filename = __cjs_fileURLToPath(import.meta.url);
14
+ const __dirname = __cjs_dirname(__filename);
15
+ const require = __cjs_createRequire(import.meta.url);
16
+ const __require = require;
13
17
  function _mergeNamespaces(n, m) {
14
18
  for (var i = 0; i < m.length; i++) {
15
19
  var e = m[i];
@@ -22,12 +26,6 @@ function _mergeNamespaces(n, m) {
22
26
  return n;
23
27
  }
24
28
 
25
- var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
26
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path$2);
27
- var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
28
- var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
29
- var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
30
-
31
29
  var build$1 = {exports: {}};
32
30
 
33
31
  /**
@@ -181,7 +179,7 @@ var deburredLetters = {
181
179
  };
182
180
 
183
181
  /** Detect free variable `global` from Node.js. */
184
- var freeGlobal = typeof index$1.commonjsGlobal == 'object' && index$1.commonjsGlobal && index$1.commonjsGlobal.Object === Object && index$1.commonjsGlobal;
182
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
185
183
 
186
184
  /** Detect free variable `self`. */
187
185
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
@@ -1138,7 +1136,7 @@ function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
1138
1136
  hash = new BatchedHash(createMd4());
1139
1137
  } else if (algorithm === "native-md4") {
1140
1138
  if (typeof crypto === "undefined") {
1141
- crypto = require$$1__default;
1139
+ crypto = require$$1;
1142
1140
 
1143
1141
  if (BulkUpdateDecorator === undefined) {
1144
1142
  BulkUpdateDecorator = BulkUpdateDecorator_1;
@@ -1148,7 +1146,7 @@ function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
1148
1146
  hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
1149
1147
  } else {
1150
1148
  if (typeof crypto === "undefined") {
1151
- crypto = require$$1__default;
1149
+ crypto = require$$1;
1152
1150
 
1153
1151
  if (BulkUpdateDecorator === undefined) {
1154
1152
  BulkUpdateDecorator = BulkUpdateDecorator_1;
@@ -1180,7 +1178,7 @@ function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
1180
1178
 
1181
1179
  var getHashDigest_1 = getHashDigest$1;
1182
1180
 
1183
- const path$1 = path__default;
1181
+ const path$1 = path$2;
1184
1182
  const getHashDigest = getHashDigest_1;
1185
1183
 
1186
1184
  function interpolateName$1(loaderContext, name, options = {}) {
@@ -1296,7 +1294,7 @@ function interpolateName$1(loaderContext, name, options = {}) {
1296
1294
  var interpolateName_1 = interpolateName$1;
1297
1295
 
1298
1296
  var interpolateName = interpolateName_1;
1299
- var path = path__default;
1297
+ var path = path$2;
1300
1298
 
1301
1299
  /**
1302
1300
  * @param {string} pattern
@@ -1480,7 +1478,7 @@ Object.defineProperty(loader, "__esModule", {
1480
1478
  value: true
1481
1479
  });
1482
1480
 
1483
- var _postcss$1 = require$$0__default;
1481
+ var _postcss$1 = require$$0;
1484
1482
 
1485
1483
  var _postcss2$1 = _interopRequireDefault$5(_postcss$1);
1486
1484
 
@@ -1488,7 +1486,7 @@ var _fs$1 = fs__default;
1488
1486
 
1489
1487
  var _fs2 = _interopRequireDefault$5(_fs$1);
1490
1488
 
1491
- var _path = path__default;
1489
+ var _path = path$2;
1492
1490
 
1493
1491
  var _path2 = _interopRequireDefault$5(_path);
1494
1492
 
@@ -3113,7 +3111,7 @@ var attribute$1 = {};
3113
3111
  * For Node.js, simply re-export the core `util.deprecate` function.
3114
3112
  */
3115
3113
 
3116
- var node = require$$0__default$1.deprecate;
3114
+ var node = require$$0$1.deprecate;
3117
3115
 
3118
3116
  (function (exports) {
3119
3117
 
@@ -6001,7 +5999,7 @@ var src$3 = {
6001
5999
  };
6002
6000
 
6003
6001
  const selectorParser$1 = dist.exports;
6004
- const valueParser = index$2.lib;
6002
+ const valueParser = lib$1;
6005
6003
  const { extractICSS } = src$3;
6006
6004
 
6007
6005
  const isSpacing = (node) => node.type === "combinator" && node.value === " ";
@@ -7315,7 +7313,7 @@ function isValidBehaviour(behaviour) {
7315
7313
  return Object.keys(behaviours).map(key => behaviours[key]).indexOf(behaviour) > -1;
7316
7314
  }
7317
7315
 
7318
- var _postcss = require$$0__default;
7316
+ var _postcss = require$$0;
7319
7317
 
7320
7318
  var _postcss2 = _interopRequireDefault(_postcss);
7321
7319
 
@@ -7504,4 +7502,4 @@ var index = /*#__PURE__*/_mergeNamespaces({
7504
7502
  postcss: postcss
7505
7503
  }, [build$1.exports]);
7506
7504
 
7507
- exports.index = index;
7505
+ export { index as i };
@@ -1,7 +1,13 @@
1
- 'use strict';
1
+ import { w as getAugmentedNamespace, x as getDefaultExportFromCjs } from './dep-aea1d487.js';
2
2
 
3
- var index = require('./dep-5cb039d6.js');
3
+ import { fileURLToPath as __cjs_fileURLToPath } from 'url';
4
+ import { dirname as __cjs_dirname } from 'path';
5
+ import { createRequire as __cjs_createRequire } from 'module';
4
6
 
7
+ const __filename = __cjs_fileURLToPath(import.meta.url);
8
+ const __dirname = __cjs_dirname(__filename);
9
+ const require = __cjs_createRequire(import.meta.url);
10
+ const __require = require;
5
11
  function _mergeNamespaces(n, m) {
6
12
  for (var i = 0; i < m.length; i++) {
7
13
  var e = m[i];
@@ -5642,9 +5648,9 @@ var compilerCore_esmBundler = {
5642
5648
  generateCodeFrame: generateCodeFrame
5643
5649
  };
5644
5650
 
5645
- var require$$0 = /*@__PURE__*/index.getAugmentedNamespace(compilerCore_esmBundler);
5651
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(compilerCore_esmBundler);
5646
5652
 
5647
- var require$$1 = /*@__PURE__*/index.getAugmentedNamespace(shared_esmBundler);
5653
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(shared_esmBundler);
5648
5654
 
5649
5655
  (function (exports) {
5650
5656
 
@@ -8747,11 +8753,11 @@ exports.parserOptions = parserOptions;
8747
8753
  exports.transformStyle = transformStyle;
8748
8754
  }(compilerDom_cjs$2));
8749
8755
 
8750
- var compilerDom_cjs = /*@__PURE__*/index.getDefaultExportFromCjs(compilerDom_cjs$2);
8756
+ var compilerDom_cjs = /*@__PURE__*/getDefaultExportFromCjs(compilerDom_cjs$2);
8751
8757
 
8752
8758
  var compilerDom_cjs$1 = /*#__PURE__*/_mergeNamespaces({
8753
8759
  __proto__: null,
8754
8760
  'default': compilerDom_cjs
8755
8761
  }, [compilerDom_cjs$2]);
8756
8762
 
8757
- exports.compilerDom_cjs = compilerDom_cjs$1;
8763
+ export { compilerDom_cjs$1 as c };