vike 0.4.184-commit-6c9e3a7 → 0.4.184-commit-1f36bd8

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.
@@ -16,6 +16,8 @@ require("source-map-support/register.js");
16
16
  const getFilePath_js_1 = require("../../../../shared/getFilePath.js");
17
17
  (0, utils_js_1.assertIsNotProductionRuntime)();
18
18
  const debug = (0, utils_js_1.createDebugger)('vike:pointer-imports');
19
+ console.log('transpileWithEsbuild.ts', esbuild_1.version);
20
+ console.log('require.resolve("vike-react/config")', require.resolve('vike-react/config'));
19
21
  async function transpileAndExecuteFile(filePath, userRootDir, isConfigFile) {
20
22
  const { filePathAbsoluteFilesystem, filePathToShowToUserResolved } = filePath;
21
23
  const fileExtension = getFileExtension(filePathAbsoluteFilesystem);
@@ -63,6 +65,7 @@ async function transpileFile(filePath, transformImports, userRootDir) {
63
65
  return code;
64
66
  }
65
67
  async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
68
+ console.log('transpileWithEsbuild()');
66
69
  const entryFilePath = filePath.filePathAbsoluteFilesystem;
67
70
  const entryFileDir = path_1.default.posix.dirname(entryFilePath);
68
71
  const options = {
@@ -98,13 +101,16 @@ async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
98
101
  build.onResolve({ filter: /.*/ }, async (args) => {
99
102
  if (args.kind !== 'import-statement')
100
103
  return;
104
+ console.log('onResolve()', args);
101
105
  // Avoid infinite loop: https://github.com/evanw/esbuild/issues/3095#issuecomment-1546916366
102
106
  const useEsbuildResolver = 'useEsbuildResolver';
103
107
  if (args.pluginData?.[useEsbuildResolver])
104
108
  return;
105
109
  const { path, ...opts } = args;
106
110
  opts.pluginData = { [useEsbuildResolver]: true };
111
+ console.log('build.resolve()', path, opts);
107
112
  const resolved = await build.resolve(path, opts);
113
+ console.log('build.resolve() done');
108
114
  if (resolved.errors.length > 0) {
109
115
  /* We could do the following to let Node.js throw the error, but we don't because the error shown by esbuild is prettier: the Node.js error refers to the transpiled [build-f7i251e0iwnw]+config.ts.mjs file which isn't that nice, whereas esbuild refers to the source +config.ts file.
110
116
  pointerImports[args.path] = false
@@ -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.184-commit-6c9e3a7';
5
+ exports.PROJECT_VERSION = '0.4.184-commit-1f36bd8';
@@ -2,7 +2,7 @@ export { transpileAndExecuteFile };
2
2
  export { getConfigBuildErrorFormatted };
3
3
  export { getConfigExecutionErrorIntroMsg };
4
4
  export { isTemporaryBuildFile };
5
- import { build, formatMessages } from 'esbuild';
5
+ import { build, formatMessages, version } from 'esbuild';
6
6
  import fs from 'fs';
7
7
  import path from 'path';
8
8
  import pc from '@brillout/picocolors';
@@ -14,6 +14,8 @@ import 'source-map-support/register.js';
14
14
  import { getFilePathAbsoluteUserRootDir } from '../../../../shared/getFilePath.js';
15
15
  assertIsNotProductionRuntime();
16
16
  const debug = createDebugger('vike:pointer-imports');
17
+ console.log('transpileWithEsbuild.ts', version);
18
+ console.log('require.resolve("vike-react/config")', require.resolve('vike-react/config'));
17
19
  async function transpileAndExecuteFile(filePath, userRootDir, isConfigFile) {
18
20
  const { filePathAbsoluteFilesystem, filePathToShowToUserResolved } = filePath;
19
21
  const fileExtension = getFileExtension(filePathAbsoluteFilesystem);
@@ -60,6 +62,7 @@ async function transpileFile(filePath, transformImports, userRootDir) {
60
62
  return code;
61
63
  }
62
64
  async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
65
+ console.log('transpileWithEsbuild()');
63
66
  const entryFilePath = filePath.filePathAbsoluteFilesystem;
64
67
  const entryFileDir = path.posix.dirname(entryFilePath);
65
68
  const options = {
@@ -95,13 +98,16 @@ async function transpileWithEsbuild(filePath, userRootDir, transformImports) {
95
98
  build.onResolve({ filter: /.*/ }, async (args) => {
96
99
  if (args.kind !== 'import-statement')
97
100
  return;
101
+ console.log('onResolve()', args);
98
102
  // Avoid infinite loop: https://github.com/evanw/esbuild/issues/3095#issuecomment-1546916366
99
103
  const useEsbuildResolver = 'useEsbuildResolver';
100
104
  if (args.pluginData?.[useEsbuildResolver])
101
105
  return;
102
106
  const { path, ...opts } = args;
103
107
  opts.pluginData = { [useEsbuildResolver]: true };
108
+ console.log('build.resolve()', path, opts);
104
109
  const resolved = await build.resolve(path, opts);
110
+ console.log('build.resolve() done');
105
111
  if (resolved.errors.length > 0) {
106
112
  /* We could do the following to let Node.js throw the error, but we don't because the error shown by esbuild is prettier: the Node.js error refers to the transpiled [build-f7i251e0iwnw]+config.ts.mjs file which isn't that nice, whereas esbuild refers to the source +config.ts file.
107
113
  pointerImports[args.path] = false
@@ -1 +1 @@
1
- export declare const PROJECT_VERSION: "0.4.184-commit-6c9e3a7";
1
+ export declare const PROJECT_VERSION: "0.4.184-commit-1f36bd8";
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.184-commit-6c9e3a7';
2
+ export const PROJECT_VERSION = '0.4.184-commit-1f36bd8';
@@ -1,4 +1,4 @@
1
1
  export declare const projectInfo: {
2
2
  projectName: "Vike";
3
- projectVersion: "0.4.184-commit-6c9e3a7";
3
+ projectVersion: "0.4.184-commit-1f36bd8";
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.184-commit-6c9e3a7",
3
+ "version": "0.4.184-commit-1f36bd8",
4
4
  "scripts": {
5
5
  "dev": "tsc --watch",
6
6
  "build": "rimraf dist/ && pnpm run build:esm && pnpm run build:cjs",