vite 2.8.0-beta.2 → 2.8.0-beta.3

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/dist/node/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var require$$0 = require('events');
4
- var build = require('./chunks/dep-8a5fd784.js');
4
+ var build = require('./chunks/dep-a5ab6d86.js');
5
5
  var perf_hooks = require('perf_hooks');
6
6
  require('fs');
7
7
  require('path');
@@ -22,7 +22,6 @@ require('assert');
22
22
  require('buffer');
23
23
  require('querystring');
24
24
  require('esbuild');
25
- require('json5');
26
25
  require('child_process');
27
26
  require('worker_threads');
28
27
  require('readline');
@@ -684,7 +683,7 @@ cli
684
683
  .action(async (root, options) => {
685
684
  // output structure is preserved even after bundling so require()
686
685
  // is ok here
687
- const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-8a5fd784.js'); }).then(function (n) { return n.index$1; });
686
+ const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-a5ab6d86.js'); }).then(function (n) { return n.index$1; });
688
687
  try {
689
688
  const server = await createServer({
690
689
  root,
@@ -733,7 +732,7 @@ cli
733
732
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
734
733
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
735
734
  .action(async (root, options) => {
736
- const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-8a5fd784.js'); }).then(function (n) { return n.build$1; });
735
+ const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-a5ab6d86.js'); }).then(function (n) { return n.build$1; });
737
736
  const buildOptions = cleanOptions(options);
738
737
  try {
739
738
  await build$1({
@@ -756,7 +755,7 @@ cli
756
755
  .command('optimize [root]')
757
756
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
758
757
  .action(async (root, options) => {
759
- const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-8a5fd784.js'); }).then(function (n) { return n.index; });
758
+ const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-a5ab6d86.js'); }).then(function (n) { return n.index; });
760
759
  try {
761
760
  const config = await build.resolveConfig({
762
761
  root,
@@ -1333,6 +1333,7 @@ export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alia
1333
1333
  root: string;
1334
1334
  base: string;
1335
1335
  publicDir: string;
1336
+ cacheDir: string;
1336
1337
  command: 'build' | 'serve';
1337
1338
  mode: string;
1338
1339
  isProduction: boolean;
@@ -1894,6 +1895,7 @@ export declare interface UserConfig {
1894
1895
  * the performance. You can use `--force` flag or manually delete the directory
1895
1896
  * to regenerate the cache files. The value can be either an absolute file
1896
1897
  * system path or a path relative to <root>.
1898
+ * Default to `.vite` when no package.json is detected.
1897
1899
  * @default 'node_modules/.vite'
1898
1900
  */
1899
1901
  cacheDir?: string;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var build = require('./chunks/dep-8a5fd784.js');
5
+ var build = require('./chunks/dep-a5ab6d86.js');
6
6
  require('fs');
7
7
  require('path');
8
8
  require('tty');
@@ -24,7 +24,6 @@ require('assert');
24
24
  require('buffer');
25
25
  require('querystring');
26
26
  require('esbuild');
27
- require('json5');
28
27
  require('child_process');
29
28
  require('worker_threads');
30
29
  require('readline');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "2.8.0-beta.2",
3
+ "version": "2.8.0-beta.3",
4
4
  "license": "MIT",
5
5
  "author": "Evan You",
6
6
  "description": "Native-ESM powered web dev build tool",
@@ -45,7 +45,6 @@
45
45
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
46
46
  "dependencies": {
47
47
  "esbuild": "0.14.3",
48
- "json5": "^2.2.0",
49
48
  "postcss": "^8.4.5",
50
49
  "resolve": "^1.20.0",
51
50
  "rollup": "^2.59.0"
@@ -95,6 +94,7 @@
95
94
  "etag": "^1.8.1",
96
95
  "fast-glob": "^3.2.7",
97
96
  "http-proxy": "^1.18.1",
97
+ "json5": "^2.2.0",
98
98
  "launch-editor-middleware": "^2.3.0",
99
99
  "magic-string": "^0.25.7",
100
100
  "micromatch": "^4.0.4",
@@ -105,7 +105,7 @@
105
105
  "periscopic": "^2.0.3",
106
106
  "picocolors": "^1.0.0",
107
107
  "postcss-import": "^14.0.2",
108
- "postcss-load-config": "^3.1.0",
108
+ "postcss-load-config": "^3.1.1",
109
109
  "postcss-modules": "^4.3.0",
110
110
  "resolve.exports": "^1.1.0",
111
111
  "rollup-plugin-license": "^2.6.0",
@@ -4,6 +4,15 @@
4
4
 
5
5
  /* eslint-disable @typescript-eslint/consistent-type-imports */
6
6
 
7
+ // Duplicate import('../src/node/importGlob').AssertOptions
8
+ // Avoid breaking the production client type because this file is referenced
9
+ // in vite/client.d.ts and in production src/node/importGlob.ts doesn't exist
10
+ interface AssertOptions {
11
+ assert?: {
12
+ type: string
13
+ }
14
+ }
15
+
7
16
  interface ImportMeta {
8
17
  url: string
9
18
 
@@ -52,7 +61,7 @@ interface ImportMeta {
52
61
 
53
62
  glob(
54
63
  pattern: string,
55
- options?: import('../src/node/importGlob').AssertOptions
64
+ options?: AssertOptions
56
65
  ): Record<
57
66
  string,
58
67
  () => Promise<{
@@ -62,7 +71,7 @@ interface ImportMeta {
62
71
 
63
72
  globEager(
64
73
  pattern: string,
65
- options?: import('../src/node/importGlob').AssertOptions
74
+ options?: AssertOptions
66
75
  ): Record<
67
76
  string,
68
77
  {