vite 2.7.4 → 2.7.5
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/CHANGELOG.md +13 -1
- package/dist/client/client.mjs +1 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-fd7e14cf.js → dep-05f535a1.js} +2 -2
- package/dist/node/chunks/{dep-fd7e14cf.js.map → dep-05f535a1.js.map} +1 -1
- package/dist/node/chunks/{dep-ef3cdce0.js → dep-4b67bc15.js} +2 -2
- package/dist/node/chunks/{dep-ef3cdce0.js.map → dep-4b67bc15.js.map} +1 -1
- package/dist/node/chunks/{dep-a89a79de.js → dep-bab9c4d6.js} +2 -2
- package/dist/node/chunks/{dep-a89a79de.js.map → dep-bab9c4d6.js.map} +1 -1
- package/dist/node/chunks/{dep-cb6d7f22.js → dep-bc5f477e.js} +11 -6
- package/dist/node/chunks/{dep-cb6d7f22.js.map → dep-bc5f477e.js.map} +1 -1
- package/dist/node/cli.js +4 -4
- package/dist/node/index.js +1 -1
- package/package.json +1 -1
- package/src/client/client.ts +1 -1
- package/types/importMeta.d.ts +19 -12
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-
|
|
4
|
+
var build = require('./chunks/dep-bc5f477e.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -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-
|
|
686
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-bc5f477e.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: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-bc5f477e.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build$1({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]')
|
|
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-
|
|
758
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-bc5f477e.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
package/src/client/client.ts
CHANGED
|
@@ -100,7 +100,7 @@ async function handleMessage(payload: HMRPayload) {
|
|
|
100
100
|
if (payload.path && payload.path.endsWith('.html')) {
|
|
101
101
|
// if html file is edited, only reload the page if the browser is
|
|
102
102
|
// currently on that page.
|
|
103
|
-
const pagePath = location.pathname
|
|
103
|
+
const pagePath = decodeURI(location.pathname)
|
|
104
104
|
const payloadPath = base + payload.path.slice(1)
|
|
105
105
|
if (
|
|
106
106
|
pagePath === payloadPath ||
|
package/types/importMeta.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
UpdatePayload
|
|
7
|
-
} from './hmrPayload'
|
|
1
|
+
// This file is an augmentation to the built-in ImportMeta interface
|
|
2
|
+
// Thus cannot contain any top-level imports
|
|
3
|
+
// <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/consistent-type-imports */
|
|
8
6
|
|
|
9
7
|
interface ImportMeta {
|
|
10
8
|
url: string
|
|
@@ -27,15 +25,24 @@ interface ImportMeta {
|
|
|
27
25
|
invalidate(): void
|
|
28
26
|
|
|
29
27
|
on: {
|
|
30
|
-
(
|
|
31
|
-
|
|
28
|
+
(
|
|
29
|
+
event: 'vite:beforeUpdate',
|
|
30
|
+
cb: (payload: import('./hmrPayload').UpdatePayload) => void
|
|
31
|
+
): void
|
|
32
|
+
(
|
|
33
|
+
event: 'vite:beforePrune',
|
|
34
|
+
cb: (payload: import('./hmrPayload').PrunePayload) => void
|
|
35
|
+
): void
|
|
32
36
|
(
|
|
33
37
|
event: 'vite:beforeFullReload',
|
|
34
|
-
cb: (payload: FullReloadPayload) => void
|
|
38
|
+
cb: (payload: import('./hmrPayload').FullReloadPayload) => void
|
|
39
|
+
): void
|
|
40
|
+
(
|
|
41
|
+
event: 'vite:error',
|
|
42
|
+
cb: (payload: import('./hmrPayload').ErrorPayload) => void
|
|
35
43
|
): void
|
|
36
|
-
(event: 'vite:error', cb: (payload: ErrorPayload) => void): void
|
|
37
44
|
<T extends string>(
|
|
38
|
-
event: CustomEventName<T>,
|
|
45
|
+
event: import('./customEvent').CustomEventName<T>,
|
|
39
46
|
cb: (data: any) => void
|
|
40
47
|
): void
|
|
41
48
|
}
|