vite 2.9.0-beta.7 → 2.9.0-beta.8

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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./dep-0e100549.js');
3
+ var index = require('./dep-a7fb482c.js');
4
4
  var require$$1 = require('crypto');
5
5
  require('fs');
6
6
  require('path');
@@ -19,9 +19,9 @@ require('https');
19
19
  require('zlib');
20
20
  require('tls');
21
21
  require('assert');
22
+ require('esbuild');
22
23
  require('buffer');
23
24
  require('querystring');
24
- require('esbuild');
25
25
  require('child_process');
26
26
  require('worker_threads');
27
27
  require('readline');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./dep-0e100549.js');
3
+ var index = require('./dep-a7fb482c.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
@@ -18,9 +18,9 @@ var zlib$1 = require('zlib');
18
18
  var require$$1$1 = require('crypto');
19
19
  var require$$4 = require('tls');
20
20
  var require$$5 = require('assert');
21
+ var esbuild = require('esbuild');
21
22
  var require$$0$8 = require('buffer');
22
23
  var qs = require('querystring');
23
- var esbuild = require('esbuild');
24
24
  var require$$1$5 = require('child_process');
25
25
  var require$$1$2 = require('worker_threads');
26
26
  var readline = require('readline');
@@ -2514,11 +2514,14 @@ function combineSourcemaps(filename, sourcemapList) {
2514
2514
  }
2515
2515
  // hack for parse broken with normalized absolute paths on windows (C:/path/to/something).
2516
2516
  // escape them to linux like paths
2517
- sourcemapList.forEach((sourcemap) => {
2518
- sourcemap.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null);
2517
+ // also avoid mutation here to prevent breaking plugin's using cache to generate sourcemaps like vue (see #7442)
2518
+ sourcemapList = sourcemapList.map((sourcemap) => {
2519
+ const newSourcemaps = { ...sourcemap };
2520
+ newSourcemaps.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null);
2519
2521
  if (sourcemap.sourceRoot) {
2520
- sourcemap.sourceRoot = escapeToLinuxLikePath(sourcemap.sourceRoot);
2522
+ newSourcemaps.sourceRoot = escapeToLinuxLikePath(sourcemap.sourceRoot);
2521
2523
  }
2524
+ return newSourcemaps;
2522
2525
  });
2523
2526
  const escapedFilename = escapeToLinuxLikePath(filename);
2524
2527
  // We don't declare type here so we can convert/fake/map as RawSourceMap
@@ -18601,6 +18604,8 @@ async function injectSourcesContent(map, file, logger) {
18601
18604
  sourcePath = path__default.resolve(sourceRoot, sourcePath);
18602
18605
  }
18603
18606
  return fs$n.promises.readFile(sourcePath, 'utf-8').catch(() => {
18607
+ if (maybeVirtualHtmlSet.has(normalizePath$4(sourcePath)))
18608
+ return null;
18604
18609
  missingSources.push(sourcePath);
18605
18610
  return null;
18606
18611
  });
@@ -19086,7 +19091,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
19086
19091
  replacer: urlReplacer
19087
19092
  }));
19088
19093
  if (isModule) {
19089
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-d52558aa.js'); }).then(function (n) { return n.index; })).default({
19094
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-c9843b31.js'); }).then(function (n) { return n.index; })).default({
19090
19095
  ...modulesOptions,
19091
19096
  getJSON(cssFileName, _modules, outputFileName) {
19092
19097
  modules = _modules;
@@ -19514,8 +19519,10 @@ const less = async (source, root, options, resolvers) => {
19514
19519
  };
19515
19520
  return { code: '', errors: [normalizedError], deps: [] };
19516
19521
  }
19517
- const map = JSON.parse(result.map);
19518
- delete map.sourcesContent;
19522
+ const map = result.map && JSON.parse(result.map);
19523
+ if (map) {
19524
+ delete map.sourcesContent;
19525
+ }
19519
19526
  return {
19520
19527
  code: result.css.toString(),
19521
19528
  map,
@@ -21598,7 +21605,7 @@ function htmlInlineProxyPlugin(config) {
21598
21605
  const file = cleanUrl(id);
21599
21606
  const url = file.replace(normalizePath$4(config.root), '');
21600
21607
  const result = htmlProxyMap.get(config).get(url)[index];
21601
- if (typeof result === 'string') {
21608
+ if (result) {
21602
21609
  return result;
21603
21610
  }
21604
21611
  else {
@@ -21608,14 +21615,14 @@ function htmlInlineProxyPlugin(config) {
21608
21615
  }
21609
21616
  };
21610
21617
  }
21611
- function addToHTMLProxyCache(config, filePath, index, code) {
21618
+ function addToHTMLProxyCache(config, filePath, index, result) {
21612
21619
  if (!htmlProxyMap.get(config)) {
21613
21620
  htmlProxyMap.set(config, new Map());
21614
21621
  }
21615
21622
  if (!htmlProxyMap.get(config).get(filePath)) {
21616
21623
  htmlProxyMap.get(config).set(filePath, []);
21617
21624
  }
21618
- htmlProxyMap.get(config).get(filePath)[index] = code;
21625
+ htmlProxyMap.get(config).get(filePath)[index] = result;
21619
21626
  }
21620
21627
  function addToHTMLProxyTransformResult(hash, code) {
21621
21628
  htmlProxyResult.set(hash, code);
@@ -21632,7 +21639,7 @@ const assetAttrsConfig = {
21632
21639
  const isAsyncScriptMap = new WeakMap();
21633
21640
  async function traverseHtml(html, filePath, visitor) {
21634
21641
  // lazy load compiler
21635
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-ee121766.js'); }).then(function (n) { return n.compilerDom_cjs; });
21642
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-57c89c81.js'); }).then(function (n) { return n.compilerDom_cjs; });
21636
21643
  // @vue/compiler-core doesn't like lowercase doctypes
21637
21644
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
21638
21645
  try {
@@ -21747,7 +21754,9 @@ function buildHtmlPlugin(config) {
21747
21754
  .join('');
21748
21755
  // <script type="module">...</script>
21749
21756
  const filePath = id.replace(normalizePath$4(config.root), '');
21750
- addToHTMLProxyCache(config, filePath, inlineModuleIndex, contents);
21757
+ addToHTMLProxyCache(config, filePath, inlineModuleIndex, {
21758
+ code: contents
21759
+ });
21751
21760
  js += `\nimport "${id}?html-proxy&index=${inlineModuleIndex}.js"`;
21752
21761
  shouldRemove = true;
21753
21762
  }
@@ -21813,7 +21822,7 @@ function buildHtmlPlugin(config) {
21813
21822
  const styleNode = inlineStyle.value;
21814
21823
  const code = styleNode.content;
21815
21824
  const filePath = id.replace(normalizePath$4(config.root), '');
21816
- addToHTMLProxyCache(config, filePath, inlineModuleIndex, code);
21825
+ addToHTMLProxyCache(config, filePath, inlineModuleIndex, { code });
21817
21826
  // will transform with css plugin and cache result with css-post plugin
21818
21827
  js += `\nimport "${id}?html-proxy&inline-css&index=${inlineModuleIndex}.css"`;
21819
21828
  // will transfrom in `applyHtmlTransforms`
@@ -21824,7 +21833,9 @@ function buildHtmlPlugin(config) {
21824
21833
  const styleNode = node.children.pop();
21825
21834
  const filePath = id.replace(normalizePath$4(config.root), '');
21826
21835
  inlineModuleIndex++;
21827
- addToHTMLProxyCache(config, filePath, inlineModuleIndex, styleNode.content);
21836
+ addToHTMLProxyCache(config, filePath, inlineModuleIndex, {
21837
+ code: styleNode.content
21838
+ });
21828
21839
  js += `\nimport "${id}?html-proxy&index=${inlineModuleIndex}.css"`;
21829
21840
  shouldRemove = true;
21830
21841
  }
@@ -22034,11 +22045,13 @@ function resolveHtmlTransforms(plugins) {
22034
22045
  }
22035
22046
  return [preHooks, postHooks];
22036
22047
  }
22048
+ const maybeVirtualHtmlSet = new Set();
22037
22049
  async function applyHtmlTransforms(html, hooks, ctx) {
22038
22050
  const headTags = [];
22039
22051
  const headPrependTags = [];
22040
22052
  const bodyTags = [];
22041
22053
  const bodyPrependTags = [];
22054
+ maybeVirtualHtmlSet.add(ctx.filename);
22042
22055
  for (const hook of hooks) {
22043
22056
  const res = await hook(html, ctx);
22044
22057
  if (!res) {
@@ -22604,11 +22617,21 @@ async function parseExtends(result, cache) {
22604
22617
  }
22605
22618
  }
22606
22619
  function resolveExtends(extended, from) {
22620
+ let error;
22607
22621
  try {
22608
22622
  return require$$0$5.createRequire(from).resolve(extended);
22609
22623
  } catch (e) {
22610
- throw new TSConfckParseError(`failed to resolve "extends":"${extended}" in ${from}`, "EXTENDS_RESOLVE", from, e);
22624
+ error = e;
22625
+ }
22626
+ if (!path__default.isAbsolute(extended) && !extended.startsWith("./") && !extended.startsWith("../")) {
22627
+ try {
22628
+ const fallbackExtended = path__default.join(extended, "tsconfig.json");
22629
+ return require$$0$5.createRequire(from).resolve(fallbackExtended);
22630
+ } catch (e) {
22631
+ error = e;
22632
+ }
22611
22633
  }
22634
+ throw new TSConfckParseError(`failed to resolve "extends":"${extended}" in ${from}`, "EXTENDS_RESOLVE", from, error);
22612
22635
  }
22613
22636
  var EXTENDABLE_KEYS = [
22614
22637
  "compilerOptions",
@@ -36326,7 +36349,7 @@ async function createPluginContainer({ plugins, logger, root, build: { rollupOpt
36326
36349
  ? new MagicString$1(this.originalCode).generateMap({
36327
36350
  includeContent: true,
36328
36351
  hires: true,
36329
- source: this.filename
36352
+ source: cleanUrl(this.filename)
36330
36353
  })
36331
36354
  : null;
36332
36355
  }
@@ -36966,6 +36989,9 @@ function loadCachedDepOptimizationMetadata(config, force = config.server.force,
36966
36989
  return cachedMetadata;
36967
36990
  }
36968
36991
  }
36992
+ else {
36993
+ config.logger.info('Forced re-optimization of dependencies');
36994
+ }
36969
36995
  // Start with a fresh cache
36970
36996
  removeDirSync(depsCacheDir);
36971
36997
  }
@@ -38129,7 +38155,9 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
38129
38155
  : isObject$4(data.browser) && data.browser['.'];
38130
38156
  if (browserEntry) {
38131
38157
  // check if the package also has a "module" field.
38132
- if (typeof data.module === 'string' && data.module !== browserEntry) {
38158
+ if (!options.isRequire &&
38159
+ typeof data.module === 'string' &&
38160
+ data.module !== browserEntry) {
38133
38161
  // if both are present, we may have a problem: some package points both
38134
38162
  // to ESM, with "module" targeting Node.js, while some packages points
38135
38163
  // "module" to browser ESM and "browser" to UMD.
@@ -44813,7 +44841,7 @@ async function getCertificate(cacheDir) {
44813
44841
  return content;
44814
44842
  }
44815
44843
  catch {
44816
- const content = (await Promise.resolve().then(function () { return require('./dep-b2e77f82.js'); })).createCertificate();
44844
+ const content = (await Promise.resolve().then(function () { return require('./dep-35d2a41c.js'); })).createCertificate();
44817
44845
  fs$n.promises
44818
44846
  .mkdir(cacheDir, { recursive: true })
44819
44847
  .then(() => fs$n.promises.writeFile(cachePath, content))
@@ -49045,8 +49073,11 @@ function createWebSocketServer(server, config, httpsOptions) {
49045
49073
  let wss;
49046
49074
  let httpsServer = undefined;
49047
49075
  const hmr = isObject$4(config.server.hmr) && config.server.hmr;
49048
- const wsServer = (hmr && hmr.server) ||
49049
- ((!(hmr && hmr.port) || hmr.port !== config.server.port) && server);
49076
+ const hmrServer = hmr && hmr.server;
49077
+ const hmrPort = hmr && hmr.port;
49078
+ // TODO: the main server port may not have been chosen yet as it may use the next available
49079
+ const portsAreCompatible = !hmrPort || hmrPort === config.server.port;
49080
+ const wsServer = hmrServer || (portsAreCompatible && server);
49050
49081
  if (wsServer) {
49051
49082
  wss = new websocketServer({ noServer: true });
49052
49083
  wsServer.on('upgrade', (req, socket, head) => {
@@ -49059,7 +49090,7 @@ function createWebSocketServer(server, config, httpsOptions) {
49059
49090
  }
49060
49091
  else {
49061
49092
  const websocketServerOptions = {};
49062
- const port = (hmr && hmr.port) || 24678;
49093
+ const port = hmrPort || 24678;
49063
49094
  const host = (hmr && hmr.host) || undefined;
49064
49095
  if (httpsOptions) {
49065
49096
  // if we're serving the middlewares over https, the ws library doesn't support automatically creating an https server, so we need to do it ourselves
@@ -53071,7 +53102,7 @@ function getHtmlFilename(url, server) {
53071
53102
  return decodeURIComponent(fsPathFromId(url));
53072
53103
  }
53073
53104
  else {
53074
- return decodeURIComponent(path__default.join(server.config.root, url.slice(1)));
53105
+ return decodeURIComponent(normalizePath$4(path__default.join(server.config.root, url.slice(1))));
53075
53106
  }
53076
53107
  }
53077
53108
  const startsWithSingleSlashRE = /^\/(?!\/)/;
@@ -53099,7 +53130,7 @@ const processNodeUrl = (node, s, config, htmlPath, originalUrl, moduleGraph) =>
53099
53130
  s.overwrite(node.value.loc.start.offset, node.value.loc.end.offset, `"${path__default.posix.join(path__default.posix.relative(originalUrl, '/'), url.slice(1))}"`, { contentOnly: true });
53100
53131
  }
53101
53132
  };
53102
- const devHtmlHook = async (html, { path: htmlPath, server, originalUrl }) => {
53133
+ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl }) => {
53103
53134
  const { config, moduleGraph } = server;
53104
53135
  const base = config.base || '/';
53105
53136
  const s = new MagicString$1(html);
@@ -53108,11 +53139,15 @@ const devHtmlHook = async (html, { path: htmlPath, server, originalUrl }) => {
53108
53139
  const addInlineModule = (node, ext) => {
53109
53140
  inlineModuleIndex++;
53110
53141
  const url = filePath.replace(normalizePath$4(config.root), '');
53111
- const contents = node.children
53112
- .map((child) => child.content || '')
53113
- .join('');
53142
+ const contentNode = node.children[0];
53143
+ const code = contentNode.content;
53144
+ const map = new MagicString$1(html)
53145
+ .snip(contentNode.loc.start.offset, contentNode.loc.end.offset)
53146
+ .generateMap({ hires: true });
53147
+ map.sources = [filename];
53148
+ map.file = filename;
53114
53149
  // add HTML Proxy to Map
53115
- addToHTMLProxyCache(config, url, inlineModuleIndex, contents);
53150
+ addToHTMLProxyCache(config, url, inlineModuleIndex, { code, map });
53116
53151
  // inline js module. convert to src="proxy"
53117
53152
  const modulePath = `${config.base + htmlPath.slice(1)}?html-proxy&index=${inlineModuleIndex}.${ext}`;
53118
53153
  // invalidate the module so the newly cached contents will be served
@@ -53132,7 +53167,7 @@ const devHtmlHook = async (html, { path: htmlPath, server, originalUrl }) => {
53132
53167
  if (src) {
53133
53168
  processNodeUrl(src, s, config, htmlPath, originalUrl, moduleGraph);
53134
53169
  }
53135
- else if (isModule) {
53170
+ else if (isModule && node.children.length) {
53136
53171
  addInlineModule(node, 'js');
53137
53172
  }
53138
53173
  }
@@ -55760,11 +55795,13 @@ function createOptimizedDeps(server) {
55760
55795
  let newDepsDiscovered = false;
55761
55796
  let newDepsToLog = [];
55762
55797
  let newDepsToLogHandle;
55763
- const logNewDeps = () => {
55764
- config.logger.info(colors$1.green(`✨ dependencies optimized: ${depsLogString(newDepsToLog)}`), {
55765
- timestamp: true
55766
- });
55767
- newDepsToLog = [];
55798
+ const logNewlyDiscoveredDeps = () => {
55799
+ if (newDepsToLog.length) {
55800
+ config.logger.info(colors$1.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), {
55801
+ timestamp: true
55802
+ });
55803
+ newDepsToLog = [];
55804
+ }
55768
55805
  };
55769
55806
  let depOptimizationProcessing = newDepOptimizationProcessing();
55770
55807
  let depOptimizationProcessingQueue = [];
@@ -55814,7 +55851,7 @@ function createOptimizedDeps(server) {
55814
55851
  };
55815
55852
  setTimeout(warmUp, 0);
55816
55853
  }
55817
- async function runOptimizer() {
55854
+ async function runOptimizer(isRerun = false) {
55818
55855
  // Ensure that rerun is called sequentially
55819
55856
  enqueuedRerun = undefined;
55820
55857
  currentlyProcessing = true;
@@ -55891,26 +55928,27 @@ function createOptimizedDeps(server) {
55891
55928
  discovered.processing = undefined;
55892
55929
  }
55893
55930
  }
55894
- newDepsToLog.push(...Object.keys(newData.optimized).filter((dep) => !metadata.optimized[dep]));
55931
+ if (isRerun) {
55932
+ newDepsToLog.push(...Object.keys(newData.optimized).filter((dep) => !metadata.optimized[dep]));
55933
+ }
55895
55934
  metadata = optimizedDeps.metadata = newData;
55896
55935
  resolveEnqueuedProcessingPromises();
55897
55936
  };
55898
55937
  if (!needsReload) {
55899
55938
  commitProcessing();
55900
- if (isDebugEnabled) {
55901
- logNewDeps();
55902
- debuggerViteDeps(colors$1.green(`✨ previous optimized dependencies unchanged`), {
55903
- timestamp: true
55904
- });
55905
- }
55906
- else {
55939
+ if (!isDebugEnabled) {
55907
55940
  if (newDepsToLogHandle)
55908
55941
  clearTimeout(newDepsToLogHandle);
55909
55942
  newDepsToLogHandle = setTimeout(() => {
55910
55943
  newDepsToLogHandle = undefined;
55911
- logNewDeps();
55944
+ logNewlyDiscoveredDeps();
55912
55945
  }, 2 * debounceMs);
55913
55946
  }
55947
+ else {
55948
+ debuggerViteDeps(colors$1.green(`✨ optimized dependencies unchanged`), {
55949
+ timestamp: true
55950
+ });
55951
+ }
55914
55952
  }
55915
55953
  else {
55916
55954
  if (newDepsDiscovered) {
@@ -55925,11 +55963,13 @@ function createOptimizedDeps(server) {
55925
55963
  }
55926
55964
  else {
55927
55965
  commitProcessing();
55928
- if (newDepsToLogHandle)
55929
- clearTimeout(newDepsToLogHandle);
55930
- newDepsToLogHandle = undefined;
55931
- logNewDeps();
55932
- logger.info(colors$1.green(`✨ previous optimized dependencies have changed, reloading page`), {
55966
+ if (!isDebugEnabled) {
55967
+ if (newDepsToLogHandle)
55968
+ clearTimeout(newDepsToLogHandle);
55969
+ newDepsToLogHandle = undefined;
55970
+ logNewlyDiscoveredDeps();
55971
+ }
55972
+ logger.info(colors$1.green(`✨ optimized dependencies changed. reloading`), {
55933
55973
  timestamp: true
55934
55974
  });
55935
55975
  fullReload();
@@ -55966,7 +56006,7 @@ function createOptimizedDeps(server) {
55966
56006
  debuggerViteDeps(colors$1.green(`new dependencies found: ${depsString}`), {
55967
56007
  timestamp: true
55968
56008
  });
55969
- runOptimizer();
56009
+ runOptimizer(true);
55970
56010
  }
55971
56011
  function getDiscoveredBrowserHash(hash, deps, missing) {
55972
56012
  return getHash(hash + JSON.stringify(deps) + JSON.stringify(missing) + sessionTimestamp);
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('postcss');
4
- var index$1 = require('./dep-0e100549.js');
4
+ var index$1 = require('./dep-a7fb482c.js');
5
5
  var path$2 = require('path');
6
6
  var require$$1 = require('crypto');
7
7
  var fs = require('fs');
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 index = require('./chunks/dep-0e100549.js');
4
+ var index = require('./chunks/dep-a7fb482c.js');
5
5
  var perf_hooks = require('perf_hooks');
6
6
  require('fs');
7
7
  require('path');
@@ -19,9 +19,9 @@ require('zlib');
19
19
  require('crypto');
20
20
  require('tls');
21
21
  require('assert');
22
+ require('esbuild');
22
23
  require('buffer');
23
24
  require('querystring');
24
- require('esbuild');
25
25
  require('child_process');
26
26
  require('worker_threads');
27
27
  require('readline');
@@ -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-0e100549.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.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 } = await Promise.resolve().then(function () { return require('./chunks/dep-0e100549.js'); }).then(function (n) { return n.build$1; });
735
+ const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.build$1; });
736
736
  const buildOptions = cleanOptions(options);
737
737
  try {
738
738
  await build({
@@ -755,7 +755,7 @@ cli
755
755
  .command('optimize [root]', 'pre-bundle dependencies')
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-0e100549.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.index; });
759
759
  try {
760
760
  const config = await index.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-0e100549.js'); }).then(function (n) { return n.preview$1; });
781
+ const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.preview$1; });
782
782
  try {
783
783
  const server = await preview({
784
784
  root,
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./chunks/dep-0e100549.js');
5
+ var index = require('./chunks/dep-a7fb482c.js');
6
6
  require('fs');
7
7
  require('path');
8
8
  require('tty');
@@ -21,9 +21,9 @@ require('zlib');
21
21
  require('crypto');
22
22
  require('tls');
23
23
  require('assert');
24
+ require('esbuild');
24
25
  require('buffer');
25
26
  require('querystring');
26
- require('esbuild');
27
27
  require('child_process');
28
28
  require('worker_threads');
29
29
  require('readline');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.9.0-beta.7",
3
+ "version": "2.9.0-beta.8",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",
@@ -113,7 +113,7 @@
113
113
  "source-map-support": "^0.5.21",
114
114
  "strip-ansi": "^6.0.1",
115
115
  "terser": "^5.12.1",
116
- "tsconfck": "^1.2.0",
116
+ "tsconfck": "^1.2.1",
117
117
  "tslib": "^2.3.1",
118
118
  "types": "link:./types",
119
119
  "ws": "^8.5.0"