vike 0.4.256-commit-1576f08 → 0.4.256-commit-0fd6b98

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.
@@ -27,7 +27,7 @@ function getDeployConfigs(pageId, page) {
27
27
  if (!edge && !isr)
28
28
  return null;
29
29
  if (isCallable(route)) {
30
- const errMsg = (configName) => `The route of the page ${pageId} is defined via a Route Function — ${configName} isn't supported. Remove ${configName} or define the page's route using a Route String (or Filesytem Routing) instead of a Route Function.`;
30
+ const errMsg = (configName) => `The route of the page ${pageId} is defined via a Route Function — ${configName} isn't supported. Remove ${configName} or define the page's route using a Route String (or Filesystem Routing) instead of a Route Function.`;
31
31
  assertWarning(!isr, errMsg('+isr'), { onlyOnce: true });
32
32
  assertWarning(!edge, errMsg('+edge'), { onlyOnce: true });
33
33
  return null;
@@ -6,7 +6,12 @@ export function getServerInfo(vikeConfig) {
6
6
  let serverFilePath = null;
7
7
  let serverEntryVike;
8
8
  // universal-deploy support must be manually enabled
9
- const serverConfig = vikeConfig.config.server ?? false;
9
+ const serverConfig =
10
+ // +config.js > `export default { server: true }`
11
+ vikeConfig.config.server ||
12
+ // +server.js exists
13
+ !!vikeConfig._pageConfigGlobal.configValueSources.server ||
14
+ false;
10
15
  if (serverConfig === false)
11
16
  return;
12
17
  const serverPlusFile = vikeConfig._pageConfigGlobal.configValueSources.server?.[0];
@@ -2,6 +2,7 @@ import { getMagicString } from '../../shared/getMagicString.js';
2
2
  import { serverEntryVirtualId } from '@brillout/vite-plugin-server-entry/plugin';
3
3
  import { pluginCommon } from './common.js';
4
4
  import '../../assertEnvVite.js';
5
+ import { escapeRegex } from '../../../../utils/escapeRegex.js';
5
6
  export function pluginServerEntryInject(serverEntryId) {
6
7
  return {
7
8
  name: 'vike:pluginUniversalDeploy:serverEntry',
@@ -9,9 +10,7 @@ export function pluginServerEntryInject(serverEntryId) {
9
10
  transform: {
10
11
  order: 'post',
11
12
  filter: {
12
- id: {
13
- include: [serverEntryId],
14
- },
13
+ id: new RegExp(escapeRegex(serverEntryId)),
15
14
  },
16
15
  handler(code, id) {
17
16
  const { magicString, getMagicStringResult } = getMagicString(code, id);
@@ -227,7 +227,7 @@ const configDefinitionsBuiltIn = {
227
227
  global: true,
228
228
  },
229
229
  server: {
230
- env: { server: true, config: true },
230
+ env: { server: true },
231
231
  global: true,
232
232
  },
233
233
  cli: {
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.256-commit-1576f08";
1
+ export declare const PROJECT_VERSION: "0.4.256-commit-0fd6b98";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.256-commit-1576f08';
2
+ export const PROJECT_VERSION = '0.4.256-commit-0fd6b98';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.256-commit-1576f08",
3
+ "version": "0.4.256-commit-0fd6b98",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {