vike 0.4.192 → 0.4.193-commit-91f6e68

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.
@@ -74,7 +74,7 @@ function buildConfig() {
74
74
  name: 'vike:buildConfig:writeBundle',
75
75
  apply: 'build',
76
76
  // Make sure other writeBundle() hooks are called after this writeBundle() hook.
77
- // - set_constant_ASSETS_MAP() needs to be called before dist/server/ code is executed.
77
+ // - set_ASSETS_MAP() needs to be called before dist/server/ code is executed.
78
78
  // - For example, the writeBundle() hook of vite-plugin-vercel needs to be called after this writeBundle() hook, otherwise: https://github.com/vikejs/vike/issues/1527
79
79
  enforce: 'pre',
80
80
  writeBundle: {
@@ -97,7 +97,7 @@ function buildConfig() {
97
97
  }
98
98
  await promises_1.default.rm(clientManifestFilePath);
99
99
  await promises_1.default.rm(serverManifestFilePath);
100
- await (0, index_js_1.set_constant_ASSETS_MAP)(options, bundle);
100
+ await (0, index_js_1.set_ASSETS_MAP)(options, bundle);
101
101
  }
102
102
  }
103
103
  }
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.set_constant_ASSETS_MAP = exports.importBuild = void 0;
7
- const plugin_js_1 = require("@brillout/vite-plugin-server-entry/plugin.js");
6
+ exports.set_ASSETS_MAP = exports.importBuild = void 0;
7
+ const plugin_1 = require("@brillout/vite-plugin-server-entry/plugin");
8
8
  const utils_js_1 = require("../../utils.js");
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const module_1 = require("module");
@@ -28,7 +28,7 @@ function importBuild() {
28
28
  configVike = await (0, getConfigVike_js_1.getConfigVike)(config);
29
29
  }
30
30
  },
31
- ...(0, plugin_js_1.serverEntryPlugin)({
31
+ ...(0, plugin_1.serverEntryPlugin)({
32
32
  getImporterCode: () => {
33
33
  return getEntryCode(config, configVike);
34
34
  },
@@ -59,23 +59,33 @@ function getEntryCode(config, configVike) {
59
59
  return importerCode;
60
60
  }
61
61
  /** Set the value of the ASSETS_MAP constant inside dist/server/entry.js (or dist/server/index.js) */
62
- async function set_constant_ASSETS_MAP(options, bundle) {
62
+ async function set_ASSETS_MAP(options, bundle) {
63
63
  const { dir } = options;
64
64
  (0, utils_js_1.assert)(dir);
65
- // This will probably fail with @vitejs/plugin-legacy
66
- // - See `git log -p` for how we used to workaround the @vitejs/plugin-legacy issue.
67
- const serverEntry = (0, plugin_js_1.findServerEntry)(bundle);
68
- const serverEntryFilePath = path_1.default.join(dir, serverEntry.fileName);
65
+ const chunkPath = find_ASSETS_MAP(bundle);
66
+ const chunkFilePath = path_1.default.join(dir, chunkPath);
69
67
  const assetsJsonFilePath = path_1.default.join(dir, '..', 'assets.json');
70
- const [assetsJsonString, serverEntryFileContent] = await Promise.all([
68
+ const [assetsJsonString, chunkFileContent] = await Promise.all([
71
69
  await promises_1.default.readFile(assetsJsonFilePath, 'utf8'),
72
- await promises_1.default.readFile(serverEntryFilePath, 'utf8')
70
+ await promises_1.default.readFile(chunkFilePath, 'utf8')
73
71
  ]);
74
- const serverEntryFileContentPatched = serverEntryFileContent.replace(ASSETS_MAP, assetsJsonString);
75
- (0, utils_js_1.assert)(serverEntryFileContentPatched !== serverEntryFileContent);
76
- await promises_1.default.writeFile(serverEntryFilePath, serverEntryFileContentPatched);
72
+ const serverEntryFileContentPatched = chunkFileContent.replace(ASSETS_MAP, assetsJsonString);
73
+ (0, utils_js_1.assert)(serverEntryFileContentPatched !== chunkFileContent);
74
+ await promises_1.default.writeFile(chunkFilePath, serverEntryFileContentPatched);
75
+ }
76
+ exports.set_ASSETS_MAP = set_ASSETS_MAP;
77
+ function find_ASSETS_MAP(bundle) {
78
+ let chunkPath;
79
+ for (const filePath in bundle) {
80
+ const chunk = bundle[filePath];
81
+ if ('code' in chunk && chunk.code.includes(ASSETS_MAP)) {
82
+ (0, utils_js_1.assert)(!chunkPath);
83
+ chunkPath = filePath;
84
+ }
85
+ }
86
+ (0, utils_js_1.assert)(chunkPath);
87
+ return chunkPath;
77
88
  }
78
- exports.set_constant_ASSETS_MAP = set_constant_ASSETS_MAP;
79
89
  function getImportPath(config) {
80
90
  // We resolve filePathAbsolute even if we don't use it: we use require.resolve() as an assertion that the relative path is correct
81
91
  const filePathAbsolute = (0, utils_js_1.toPosixPath)(
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setImportBuildGetters = exports.loadImportBuild = void 0;
4
- const importServerEntry_js_1 = require("@brillout/vite-plugin-server-entry/importServerEntry.js");
4
+ const runtime_1 = require("@brillout/vite-plugin-server-entry/runtime");
5
5
  const utils_js_1 = require("../utils.js");
6
6
  const buildGetters = (globalThis.__vike_buildGetters = globalThis.__vike_buildGetters || {
7
7
  getters: null
@@ -12,7 +12,7 @@ function setImportBuildGetters(getters) {
12
12
  exports.setImportBuildGetters = setImportBuildGetters;
13
13
  async function loadImportBuild(outDir) {
14
14
  if (!buildGetters.getters) {
15
- await (0, importServerEntry_js_1.importServerEntry)(outDir);
15
+ await (0, runtime_1.importServerEntry)(outDir);
16
16
  (0, utils_js_1.assert)(buildGetters.getters);
17
17
  }
18
18
  const [pageFiles, assetsManifest, pluginManifest] = await Promise.all([
@@ -26,6 +26,9 @@ function inferMediaType(href) {
26
26
  if (href.endsWith('.svg')) {
27
27
  return { assetType: 'image', mediaType: 'image/svg+xml' };
28
28
  }
29
+ if (href.endsWith('.avif')) {
30
+ return { assetType: 'image', mediaType: 'image/avif' };
31
+ }
29
32
  // Fonts
30
33
  if (href.endsWith('.ttf')) {
31
34
  return { assetType: 'font', mediaType: 'font/ttf' };
@@ -24,6 +24,7 @@ function assertPlusFileExport(fileExports, filePathToShowToUser, configName) {
24
24
  }
25
25
  const exportDefault = picocolors_1.default.code('export default');
26
26
  const exportNamed = picocolors_1.default.code(`export { ${configName} }`);
27
+ (0, utils_js_1.assert)(exportNamesValid.length <= 2);
27
28
  if (exportNamesValid.length === 0) {
28
29
  (0, utils_js_1.assertUsage)(false, `${filePathToShowToUser} should have a ${exportNamed} or ${exportDefault}`);
29
30
  }
@@ -32,8 +33,6 @@ function assertPlusFileExport(fileExports, filePathToShowToUser, configName) {
32
33
  onlyOnce: true
33
34
  });
34
35
  }
35
- (0, utils_js_1.assert)(exportNamesValid.length === 1);
36
- (0, utils_js_1.assert)(exportNamesInvalid.length > 0);
37
36
  if (!TOLERATE_SIDE_EXPORTS.some((ext) => filePathToShowToUser.endsWith(ext))) {
38
37
  exportNamesInvalid.forEach((exportInvalid) => {
39
38
  (0, utils_js_1.assertWarning)(false, `${filePathToShowToUser} unexpected ${picocolors_1.default.cyan(`export { ${exportInvalid} }`)}`, {
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROJECT_VERSION = void 0;
4
4
  // Automatically updated by @brillout/release-me
5
- exports.PROJECT_VERSION = '0.4.192';
5
+ exports.PROJECT_VERSION = '0.4.193-commit-91f6e68';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isArray = void 0;
4
- // Typesafe Array.isArray() asserting unknown[] instead of any[]
4
+ // Same as Array.isArray() but typesafe: asserts unknown[] instead of any[]
5
5
  function isArray(value) {
6
6
  return Array.isArray(value);
7
7
  }
@@ -170,7 +170,8 @@ async function renderPageClientSide(renderArgs) {
170
170
  const pageContext = await createPageContext(urlOriginal);
171
171
  objectAssign(pageContext, {
172
172
  isBackwardNavigation,
173
- isClientSideNavigation
173
+ isClientSideNavigation,
174
+ _previousPageContext: globalObject.previousPageContext
174
175
  });
175
176
  {
176
177
  const pageContextFromAllRewrites = getPageContextFromAllRewrites(pageContextsFromRewrite);
@@ -12,7 +12,7 @@ import { createRequire } from 'module';
12
12
  import fs from 'fs/promises';
13
13
  import path from 'path';
14
14
  import { fixServerAssets, fixServerAssets_isEnabled } from './buildConfig/fixServerAssets.js';
15
- import { set_constant_ASSETS_MAP } from './importBuild/index.js';
15
+ import { set_ASSETS_MAP } from './importBuild/index.js';
16
16
  import { prependEntriesDir } from '../../shared/prependEntriesDir.js';
17
17
  import { getFilePathResolved } from '../shared/getFilePath.js';
18
18
  import { getConfigValueBuildTime } from '../../../shared/page-configs/getConfigValueBuildTime.js';
@@ -71,7 +71,7 @@ function buildConfig() {
71
71
  name: 'vike:buildConfig:writeBundle',
72
72
  apply: 'build',
73
73
  // Make sure other writeBundle() hooks are called after this writeBundle() hook.
74
- // - set_constant_ASSETS_MAP() needs to be called before dist/server/ code is executed.
74
+ // - set_ASSETS_MAP() needs to be called before dist/server/ code is executed.
75
75
  // - For example, the writeBundle() hook of vite-plugin-vercel needs to be called after this writeBundle() hook, otherwise: https://github.com/vikejs/vike/issues/1527
76
76
  enforce: 'pre',
77
77
  writeBundle: {
@@ -94,7 +94,7 @@ function buildConfig() {
94
94
  }
95
95
  await fs.rm(clientManifestFilePath);
96
96
  await fs.rm(serverManifestFilePath);
97
- await set_constant_ASSETS_MAP(options, bundle);
97
+ await set_ASSETS_MAP(options, bundle);
98
98
  }
99
99
  }
100
100
  }
@@ -1,8 +1,8 @@
1
1
  export { importBuild };
2
- export { set_constant_ASSETS_MAP };
2
+ export { set_ASSETS_MAP };
3
3
  import type { Plugin, Rollup } from 'vite';
4
4
  type Bundle = Rollup.OutputBundle;
5
5
  type Options = Rollup.NormalizedOutputOptions;
6
6
  declare function importBuild(): Plugin[];
7
7
  /** Set the value of the ASSETS_MAP constant inside dist/server/entry.js (or dist/server/index.js) */
8
- declare function set_constant_ASSETS_MAP(options: Options, bundle: Bundle): Promise<void>;
8
+ declare function set_ASSETS_MAP(options: Options, bundle: Bundle): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  export { importBuild };
2
- export { set_constant_ASSETS_MAP };
3
- import { serverEntryPlugin, findServerEntry } from '@brillout/vite-plugin-server-entry/plugin.js';
2
+ export { set_ASSETS_MAP };
3
+ import { serverEntryPlugin } from '@brillout/vite-plugin-server-entry/plugin';
4
4
  import { assert, getOutDirs, toPosixPath } from '../../utils.js';
5
5
  import path from 'path';
6
6
  import { createRequire } from 'module';
@@ -54,21 +54,31 @@ function getEntryCode(config, configVike) {
54
54
  return importerCode;
55
55
  }
56
56
  /** Set the value of the ASSETS_MAP constant inside dist/server/entry.js (or dist/server/index.js) */
57
- async function set_constant_ASSETS_MAP(options, bundle) {
57
+ async function set_ASSETS_MAP(options, bundle) {
58
58
  const { dir } = options;
59
59
  assert(dir);
60
- // This will probably fail with @vitejs/plugin-legacy
61
- // - See `git log -p` for how we used to workaround the @vitejs/plugin-legacy issue.
62
- const serverEntry = findServerEntry(bundle);
63
- const serverEntryFilePath = path.join(dir, serverEntry.fileName);
60
+ const chunkPath = find_ASSETS_MAP(bundle);
61
+ const chunkFilePath = path.join(dir, chunkPath);
64
62
  const assetsJsonFilePath = path.join(dir, '..', 'assets.json');
65
- const [assetsJsonString, serverEntryFileContent] = await Promise.all([
63
+ const [assetsJsonString, chunkFileContent] = await Promise.all([
66
64
  await fs.readFile(assetsJsonFilePath, 'utf8'),
67
- await fs.readFile(serverEntryFilePath, 'utf8')
65
+ await fs.readFile(chunkFilePath, 'utf8')
68
66
  ]);
69
- const serverEntryFileContentPatched = serverEntryFileContent.replace(ASSETS_MAP, assetsJsonString);
70
- assert(serverEntryFileContentPatched !== serverEntryFileContent);
71
- await fs.writeFile(serverEntryFilePath, serverEntryFileContentPatched);
67
+ const serverEntryFileContentPatched = chunkFileContent.replace(ASSETS_MAP, assetsJsonString);
68
+ assert(serverEntryFileContentPatched !== chunkFileContent);
69
+ await fs.writeFile(chunkFilePath, serverEntryFileContentPatched);
70
+ }
71
+ function find_ASSETS_MAP(bundle) {
72
+ let chunkPath;
73
+ for (const filePath in bundle) {
74
+ const chunk = bundle[filePath];
75
+ if ('code' in chunk && chunk.code.includes(ASSETS_MAP)) {
76
+ assert(!chunkPath);
77
+ chunkPath = filePath;
78
+ }
79
+ }
80
+ assert(chunkPath);
81
+ return chunkPath;
72
82
  }
73
83
  function getImportPath(config) {
74
84
  // We resolve filePathAbsolute even if we don't use it: we use require.resolve() as an assertion that the relative path is correct
@@ -1,6 +1,6 @@
1
1
  export { loadImportBuild };
2
2
  export { setImportBuildGetters };
3
- import { importServerEntry } from '@brillout/vite-plugin-server-entry/importServerEntry.js';
3
+ import { importServerEntry } from '@brillout/vite-plugin-server-entry/runtime';
4
4
  import { assert } from '../utils.js';
5
5
  const buildGetters = (globalThis.__vike_buildGetters = globalThis.__vike_buildGetters || {
6
6
  getters: null
@@ -2,6 +2,6 @@ export { inferMediaType };
2
2
  export type { MediaType };
3
3
  type MediaType = null | {
4
4
  assetType: 'image' | 'script' | 'font' | 'style' | 'audio' | 'video' | 'document' | 'fetch' | 'track' | 'worker' | 'embed' | 'object';
5
- mediaType: 'text/javascript' | 'text/css' | 'image/jpeg' | 'image/png' | 'image/webp' | 'image/gif' | 'image/svg+xml' | 'font/ttf' | 'font/woff' | 'font/woff2' | 'video/mp4' | 'video/webm' | 'video/ogg' | 'video/mpeg' | 'video/x-msvideo' | 'video/quicktime' | 'audio/mpeg' | 'audio/wav' | 'audio/ogg' | 'audio/aac' | 'audio/midi' | 'audio/flac';
5
+ mediaType: 'text/javascript' | 'text/css' | 'image/avif' | 'image/jpeg' | 'image/png' | 'image/webp' | 'image/gif' | 'image/svg+xml' | 'font/ttf' | 'font/woff' | 'font/woff2' | 'video/mp4' | 'video/webm' | 'video/ogg' | 'video/mpeg' | 'video/x-msvideo' | 'video/quicktime' | 'audio/mpeg' | 'audio/wav' | 'audio/ogg' | 'audio/aac' | 'audio/midi' | 'audio/flac';
6
6
  };
7
7
  declare function inferMediaType(href: string): MediaType;
@@ -24,6 +24,9 @@ function inferMediaType(href) {
24
24
  if (href.endsWith('.svg')) {
25
25
  return { assetType: 'image', mediaType: 'image/svg+xml' };
26
26
  }
27
+ if (href.endsWith('.avif')) {
28
+ return { assetType: 'image', mediaType: 'image/avif' };
29
+ }
27
30
  // Fonts
28
31
  if (href.endsWith('.ttf')) {
29
32
  return { assetType: 'font', mediaType: 'font/ttf' };
@@ -19,6 +19,7 @@ function assertPlusFileExport(fileExports, filePathToShowToUser, configName) {
19
19
  }
20
20
  const exportDefault = pc.code('export default');
21
21
  const exportNamed = pc.code(`export { ${configName} }`);
22
+ assert(exportNamesValid.length <= 2);
22
23
  if (exportNamesValid.length === 0) {
23
24
  assertUsage(false, `${filePathToShowToUser} should have a ${exportNamed} or ${exportDefault}`);
24
25
  }
@@ -27,8 +28,6 @@ function assertPlusFileExport(fileExports, filePathToShowToUser, configName) {
27
28
  onlyOnce: true
28
29
  });
29
30
  }
30
- assert(exportNamesValid.length === 1);
31
- assert(exportNamesInvalid.length > 0);
32
31
  if (!TOLERATE_SIDE_EXPORTS.some((ext) => filePathToShowToUser.endsWith(ext))) {
33
32
  exportNamesInvalid.forEach((exportInvalid) => {
34
33
  assertWarning(false, `${filePathToShowToUser} unexpected ${pc.cyan(`export { ${exportInvalid} }`)}`, {
@@ -3,7 +3,7 @@ export type { PageContextServer } from '../shared/types.js';
3
3
  export type { PageContextClient } from '../shared/types.js';
4
4
  export type { PageContextWithServerRouting } from '../shared/types.js';
5
5
  export type { PageContextClientWithServerRouting } from '../shared/types.js';
6
- export type { ConfigVitePluginServerEntry } from '@brillout/vite-plugin-server-entry/plugin.js';
6
+ export type { ConfigVitePluginServerEntry } from '@brillout/vite-plugin-server-entry/plugin';
7
7
  export type { PageContextBuiltInServer } from '../shared/types.js';
8
8
  export type { PageContextBuiltInClientWithClientRouting } from '../shared/types.js';
9
9
  export type { PageContextBuiltInClientWithServerRouting } from '../shared/types.js';
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.192";
1
+ export declare const PROJECT_VERSION: "0.4.193-commit-91f6e68";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.192';
2
+ export const PROJECT_VERSION = '0.4.193-commit-91f6e68';
@@ -1,4 +1,4 @@
1
- // Typesafe Array.isArray() asserting unknown[] instead of any[]
1
+ // Same as Array.isArray() but typesafe: asserts unknown[] instead of any[]
2
2
  export function isArray(value) {
3
3
  return Array.isArray(value);
4
4
  }
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.192";
3
+ projectVersion: "0.4.193-commit-91f6e68";
4
4
  };
package/package.json CHANGED
@@ -1,43 +1,8 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.192",
4
- "scripts": {
5
- "dev": "tsc --watch",
6
- "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",
7
- "build:esm": "tsc",
8
- "build:cjs": "pnpm run build:cjs:ts && pnpm run build:cjs:fixup",
9
- "build:cjs:ts": "tsc --project ./tsconfig.cjs.json",
10
- "build:cjs:fixup": "node ./dist-cjs-fixup.mjs",
11
- "release": "release-me patch",
12
- "release:minor": "release-me minor",
13
- "release:commit": "release-me commit"
14
- },
15
- "dependencies": {
16
- "@brillout/import": "^0.2.3",
17
- "@brillout/json-serializer": "^0.5.13",
18
- "@brillout/picocolors": "^1.0.14",
19
- "@brillout/require-shim": "^0.1.2",
20
- "@brillout/vite-plugin-server-entry": "^0.4.9",
21
- "acorn": "^8.0.0",
22
- "cac": "^6.0.0",
23
- "es-module-lexer": "^1.0.0",
24
- "esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
25
- "fast-glob": "^3.0.0",
26
- "semver": "^7.0.0",
27
- "sirv": "^2.0.0",
28
- "source-map-support": "^0.5.0"
29
- },
30
- "type": "module",
3
+ "version": "0.4.193-commit-91f6e68",
4
+ "repository": "https://github.com/vikejs/vike",
31
5
  "exports": {
32
- ".": {
33
- "worker": "./dist/esm/node/runtime/index-deprecated.js",
34
- "edge-light": "./dist/esm/node/runtime/index-deprecated.js",
35
- "require": "./dist/cjs/node/runtime/index-deprecated.js",
36
- "node": "./dist/esm/node/runtime/index-deprecated.js",
37
- "browser": "./dist/esm/client/node.js",
38
- "types": "./dist/esm/node/runtime/index-deprecated.d.ts",
39
- "default": "./dist/esm/node/runtime/index-deprecated.js"
40
- },
41
6
  "./server": {
42
7
  "worker": "./dist/esm/node/runtime/index.js",
43
8
  "edge-light": "./dist/esm/node/runtime/index.js",
@@ -144,8 +109,32 @@
144
109
  "node": "./dist/esm/node/runtime/globalContext/loadImportBuild.js",
145
110
  "types": "./dist/esm/node/runtime/globalContext/loadImportBuild.d.ts",
146
111
  "default": "./dist/esm/node/runtime/globalContext/loadImportBuild.js"
112
+ },
113
+ ".": {
114
+ "worker": "./dist/esm/node/runtime/index-deprecated.js",
115
+ "edge-light": "./dist/esm/node/runtime/index-deprecated.js",
116
+ "require": "./dist/cjs/node/runtime/index-deprecated.js",
117
+ "node": "./dist/esm/node/runtime/index-deprecated.js",
118
+ "browser": "./dist/esm/client/node.js",
119
+ "types": "./dist/esm/node/runtime/index-deprecated.d.ts",
120
+ "default": "./dist/esm/node/runtime/index-deprecated.js"
147
121
  }
148
122
  },
123
+ "dependencies": {
124
+ "@brillout/import": "^0.2.3",
125
+ "@brillout/json-serializer": "^0.5.13",
126
+ "@brillout/picocolors": "^1.0.14",
127
+ "@brillout/require-shim": "^0.1.2",
128
+ "@brillout/vite-plugin-server-entry": "^0.4.11",
129
+ "acorn": "^8.0.0",
130
+ "cac": "^6.0.0",
131
+ "es-module-lexer": "^1.0.0",
132
+ "esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
133
+ "fast-glob": "^3.0.0",
134
+ "semver": "^7.0.0",
135
+ "sirv": "^2.0.0",
136
+ "source-map-support": "^0.5.0"
137
+ },
149
138
  "peerDependencies": {
150
139
  "react-streaming": ">=0.3.42",
151
140
  "vite": ">=5.1.0"
@@ -155,8 +144,19 @@
155
144
  "optional": true
156
145
  }
157
146
  },
158
- "main": "./dist/esm/node/runtime/index-deprecated.js",
159
- "types": "./dist/esm/node/runtime/index-deprecated.d.ts",
147
+ "engines": {
148
+ "node": ">=18.0.0"
149
+ },
150
+ "license": "MIT",
151
+ "description": "Flexible, lean, community-driven, dependable, fast Vite-based frontend framework.",
152
+ "keywords": [
153
+ "react",
154
+ "vue",
155
+ "solid",
156
+ "vite",
157
+ "vite-plugin",
158
+ "ssr"
159
+ ],
160
160
  "typesVersions": {
161
161
  "*": {
162
162
  "types": [
@@ -203,9 +203,26 @@
203
203
  ]
204
204
  }
205
205
  },
206
+ "main": "./dist/esm/node/runtime/index-deprecated.js",
207
+ "types": "./dist/esm/node/runtime/index-deprecated.d.ts",
208
+ "type": "module",
206
209
  "bin": {
207
210
  "vike": "./node/cli/bin-entry.js"
208
211
  },
212
+ "files": [
213
+ "dist/",
214
+ "cli.js",
215
+ "client.js",
216
+ "client/router.js",
217
+ "plugin.js",
218
+ "prerender.js",
219
+ "routing.js",
220
+ "abort.js",
221
+ "RenderErrorPage.js",
222
+ "server.js",
223
+ "__internal.js",
224
+ "__internal/setup.js"
225
+ ],
209
226
  "devDependencies": {
210
227
  "@biomejs/biome": "^1.5.3",
211
228
  "@brillout/release-me": "^0.4.0",
@@ -227,32 +244,15 @@
227
244
  "typescript": "^5.4.5",
228
245
  "vite": "^5.4.0"
229
246
  },
230
- "engines": {
231
- "node": ">=18.0.0"
232
- },
233
- "description": "Like Next.js/Nuxt but as do-one-thing-do-it-well Vite plugin.",
234
- "repository": "https://github.com/vikejs/vike",
235
- "files": [
236
- "dist/",
237
- "cli.js",
238
- "client.js",
239
- "client/router.js",
240
- "plugin.js",
241
- "prerender.js",
242
- "routing.js",
243
- "abort.js",
244
- "RenderErrorPage.js",
245
- "server.js",
246
- "__internal.js",
247
- "__internal/setup.js"
248
- ],
249
- "license": "MIT",
250
- "keywords": [
251
- "vite",
252
- "vite-plugin",
253
- "ssr"
254
- ],
255
- "publishConfig": {
256
- "access": "public"
247
+ "scripts": {
248
+ "dev": "tsc --watch",
249
+ "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",
250
+ "build:esm": "tsc",
251
+ "build:cjs": "pnpm run build:cjs:ts && pnpm run build:cjs:fixup",
252
+ "build:cjs:ts": "tsc --project ./tsconfig.cjs.json",
253
+ "build:cjs:fixup": "node ./dist-cjs-fixup.mjs",
254
+ "release": "release-me patch",
255
+ "release:minor": "release-me minor",
256
+ "release:commit": "release-me commit"
257
257
  }
258
258
  }