vite 2.9.5 → 2.9.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,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('postcss');
4
- var index$1 = require('./dep-27bc1ab8.js');
4
+ var index$1 = require('./dep-e1fc1d62.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-27bc1ab8.js');
4
+ var index = require('./chunks/dep-e1fc1d62.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');
23
22
  require('buffer');
24
23
  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-27bc1ab8.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-e1fc1d62.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-27bc1ab8.js'); }).then(function (n) { return n.build$1; });
735
+ const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-e1fc1d62.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-27bc1ab8.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-e1fc1d62.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-27bc1ab8.js'); }).then(function (n) { return n.preview$1; });
781
+ const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-e1fc1d62.js'); }).then(function (n) { return n.preview$1; });
782
782
  try {
783
783
  const server = await preview({
784
784
  root,
@@ -613,7 +613,7 @@ export declare interface DepOptimizationResult {
613
613
  * the page reload will be delayed until the next rerun so we need
614
614
  * to be able to discard the result
615
615
  */
616
- commit: () => void;
616
+ commit: () => Promise<void>;
617
617
  cancel: () => void;
618
618
  }
619
619
 
@@ -1193,6 +1193,7 @@ export declare class ModuleNode {
1193
1193
  transformResult: TransformResult | null;
1194
1194
  ssrTransformResult: TransformResult | null;
1195
1195
  ssrModule: Record<string, any> | null;
1196
+ ssrError: Error | null;
1196
1197
  lastHMRTimestamp: number;
1197
1198
  lastInvalidationTimestamp: number;
1198
1199
  constructor(url: string);
@@ -1375,12 +1376,10 @@ export declare interface PluginContainer {
1375
1376
  close(): Promise<void>;
1376
1377
  }
1377
1378
 
1378
- export declare type PluginOption = Plugin | false | null | undefined;
1379
+ export declare type PluginOption = Plugin | false | null | undefined | PluginOption[];
1379
1380
 
1380
1381
  /**
1381
1382
  * Starts the Vite server in preview mode, to simulate a production deployment
1382
- * @param config - the resolved Vite config
1383
- * @param serverOptions - what host and port to use
1384
1383
  * @experimental
1385
1384
  */
1386
1385
  export declare function preview(inlineConfig: InlineConfig): Promise<PreviewServer>;
@@ -1748,6 +1747,8 @@ export declare interface ServerOptions extends CommonServerOptions {
1748
1747
  fs?: FileSystemServeOptions;
1749
1748
  /**
1750
1749
  * Origin for the generated asset URLs.
1750
+ *
1751
+ * @example `http://127.0.0.1:8080`
1751
1752
  */
1752
1753
  origin?: string;
1753
1754
  /**
@@ -2031,7 +2032,7 @@ export declare interface UserConfig {
2031
2032
  /**
2032
2033
  * Array of vite plugins to use.
2033
2034
  */
2034
- plugins?: (PluginOption | PluginOption[])[];
2035
+ plugins?: PluginOption[];
2035
2036
  /**
2036
2037
  * Configure resolver
2037
2038
  */
@@ -2119,7 +2120,7 @@ export declare interface UserConfig {
2119
2120
  /**
2120
2121
  * Vite plugins that apply to worker bundle
2121
2122
  */
2122
- plugins?: (PluginOption | PluginOption[])[];
2123
+ plugins?: PluginOption[];
2123
2124
  /**
2124
2125
  * Rollup options to build worker bundle
2125
2126
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var index = require('./chunks/dep-27bc1ab8.js');
5
+ var index = require('./chunks/dep-e1fc1d62.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');
25
24
  require('buffer');
26
25
  require('querystring');
26
+ require('esbuild');
27
27
  require('child_process');
28
28
  require('worker_threads');
29
29
  require('readline');