vite-plugin-mock-dev-server 1.4.6 → 1.4.7
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.
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -344,7 +344,7 @@ function canJsonParse(value) {
|
|
|
344
344
|
|
|
345
345
|
// src/build.ts
|
|
346
346
|
var packageName = true ? "vite-plugin-mock-dev-server" : "vite-plugin-mock-dev-server";
|
|
347
|
-
var packageVersion = true ? "1.4.
|
|
347
|
+
var packageVersion = true ? "1.4.7" : "latest";
|
|
348
348
|
async function generateMockServer(ctx, config, options) {
|
|
349
349
|
const include = (0, import_utils2.toArray)(options.include);
|
|
350
350
|
const exclude = (0, import_utils2.toArray)(options.exclude);
|
|
@@ -1502,7 +1502,7 @@ function mockServerMiddleware(config, options, httpServer, ws) {
|
|
|
1502
1502
|
const { httpProxies } = ensureProxies(config.server.proxy || {});
|
|
1503
1503
|
const prefix = (0, import_utils14.toArray)(options.prefix);
|
|
1504
1504
|
const proxies = (0, import_utils14.uniq)([...prefix, ...httpProxies]);
|
|
1505
|
-
if (!proxies.length
|
|
1505
|
+
if (!proxies.length && !(0, import_utils14.toArray)(options.wsPrefix).length)
|
|
1506
1506
|
logger.warn(`No proxy was configured, mock server will not work. See ${import_picocolors5.default.cyan("https://vite-plugin-mock-dev-server.netlify.app/guide/usage")}`);
|
|
1507
1507
|
mockWebSocket({
|
|
1508
1508
|
loader,
|
package/dist/index.js
CHANGED
|
@@ -294,7 +294,7 @@ function canJsonParse(value) {
|
|
|
294
294
|
|
|
295
295
|
// src/build.ts
|
|
296
296
|
var packageName = true ? "vite-plugin-mock-dev-server" : "vite-plugin-mock-dev-server";
|
|
297
|
-
var packageVersion = true ? "1.4.
|
|
297
|
+
var packageVersion = true ? "1.4.7" : "latest";
|
|
298
298
|
async function generateMockServer(ctx, config, options) {
|
|
299
299
|
const include = toArray(options.include);
|
|
300
300
|
const exclude = toArray(options.exclude);
|
|
@@ -1471,7 +1471,7 @@ function mockServerMiddleware(config, options, httpServer, ws) {
|
|
|
1471
1471
|
const { httpProxies } = ensureProxies(config.server.proxy || {});
|
|
1472
1472
|
const prefix = toArray3(options.prefix);
|
|
1473
1473
|
const proxies = uniq2([...prefix, ...httpProxies]);
|
|
1474
|
-
if (!proxies.length
|
|
1474
|
+
if (!proxies.length && !toArray3(options.wsPrefix).length)
|
|
1475
1475
|
logger.warn(`No proxy was configured, mock server will not work. See ${c2.cyan("https://vite-plugin-mock-dev-server.netlify.app/guide/usage")}`);
|
|
1476
1476
|
mockWebSocket({
|
|
1477
1477
|
loader,
|
package/package.json
CHANGED