vike 0.4.253-commit-e3b56da → 0.4.253-commit-6cfeda2
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.
|
@@ -2,15 +2,12 @@ export { pluginCommon };
|
|
|
2
2
|
import { isDevCheck } from '../../../utils/isDev.js';
|
|
3
3
|
import { isDocker } from '../../../utils/isDocker.js';
|
|
4
4
|
import { isExactlyOneTruthy } from '../../../utils/isExactlyOneTruthy.js';
|
|
5
|
-
import {
|
|
6
|
-
import { assert, assertUsage, assertWarning } from '../../../utils/assert.js';
|
|
5
|
+
import { assert, assertUsage } from '../../../utils/assert.js';
|
|
7
6
|
import { hasProp } from '../../../utils/hasProp.js';
|
|
8
7
|
import { isObject } from '../../../utils/isObject.js';
|
|
9
8
|
import { assertRollupInput } from './build/pluginBuildConfig.js';
|
|
10
9
|
import pc from '@brillout/picocolors';
|
|
11
10
|
import { assertResolveAlias } from './pluginCommon/assertResolveAlias.js';
|
|
12
|
-
import { isViteCli } from '../shared/isViteCli.js';
|
|
13
|
-
import { isVikeCliOrApi } from '../../../shared-server-node/api-context.js';
|
|
14
11
|
import { getVikeConfigInternal, setVikeConfigContext } from '../shared/resolveVikeConfigInternal.js';
|
|
15
12
|
import { assertViteRoot, getViteRoot, normalizeViteRoot } from '../../api/resolveViteConfigFromUser.js';
|
|
16
13
|
import { temp_disablePrerenderAutoRun } from '../../prerender/context.js';
|
|
@@ -75,7 +72,6 @@ function pluginCommon(vikeVitePluginOptions) {
|
|
|
75
72
|
workaroundCI(config);
|
|
76
73
|
assertRollupInput(config);
|
|
77
74
|
assertResolveAlias(config);
|
|
78
|
-
assertVikeCliOrApi(config);
|
|
79
75
|
temp_supportOldInterface(config);
|
|
80
76
|
await emitServerEntryOnlyIfNeeded(config);
|
|
81
77
|
},
|
|
@@ -83,7 +79,6 @@ function pluginCommon(vikeVitePluginOptions) {
|
|
|
83
79
|
config: {
|
|
84
80
|
order: 'post',
|
|
85
81
|
async handler(configFromUser) {
|
|
86
|
-
assertViteBuildSsr(configFromUser);
|
|
87
82
|
let configFromVike = { server: {}, preview: {} };
|
|
88
83
|
const vikeConfig = await getVikeConfigInternal();
|
|
89
84
|
if (vikeConfig.config.port !== undefined) {
|
|
@@ -140,30 +135,6 @@ function assertSingleInstance(config) {
|
|
|
140
135
|
const numberOfInstances = config.plugins.filter((o) => o.name === pluginName).length;
|
|
141
136
|
assertUsage(numberOfInstances === 1, `Vike's Vite plugin (${pc.cyan("import vike from 'vike/plugin'")}) is being added ${numberOfInstances} times to the list of Vite plugins. Make sure to add it only once instead.`);
|
|
142
137
|
}
|
|
143
|
-
function assertVikeCliOrApi(config) {
|
|
144
|
-
if (isVikeCliOrApi())
|
|
145
|
-
return;
|
|
146
|
-
if (isViteCli()) {
|
|
147
|
-
assert(!isVitest());
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
/* This warning is always shown: Vitest loads Vite *before* any Vike JavaScript API can be invoked.
|
|
151
|
-
if (isVitest()) {
|
|
152
|
-
assertWarning(
|
|
153
|
-
false,
|
|
154
|
-
`Unexpected Vitest setup: you seem to be using Vitest together with Vike's Vite plugin but without using Vike's JavaScript API which is unexpected, see ${pc.underline('https://vike.dev/vitest')}`,
|
|
155
|
-
{ onlyOnce: true },
|
|
156
|
-
)
|
|
157
|
-
return
|
|
158
|
-
}
|
|
159
|
-
*/
|
|
160
|
-
if (config.server.middlewareMode) {
|
|
161
|
-
assertWarning(false, `${pc.cyan('vite.createServer()')} is deprecated ${pc.underline('https://vike.dev/migration/cli#api')}`, {
|
|
162
|
-
onlyOnce: true,
|
|
163
|
-
});
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
138
|
// TO-DO/next-major-release: remove https://github.com/vikejs/vike/issues/2122
|
|
168
139
|
function temp_supportOldInterface(config) {
|
|
169
140
|
if (!('vitePluginSsr' in config))
|
|
@@ -192,7 +163,3 @@ async function emitServerEntryOnlyIfNeeded(config) {
|
|
|
192
163
|
config.vitePluginServerEntry.disableServerEntryEmit = true;
|
|
193
164
|
}
|
|
194
165
|
}
|
|
195
|
-
function assertViteBuildSsr(configFromUser) {
|
|
196
|
-
// https://github.com/vikejs/vike/issues/3010
|
|
197
|
-
assertUsage(configFromUser.build?.ssr === undefined, "Don't set vite.build.ssr");
|
|
198
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.253-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.253-commit-6cfeda2";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.253-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.253-commit-6cfeda2';
|