@uniformdev/next-app-router 20.74.6-alpha.1 → 20.74.6-alpha.2

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/config.d.mts CHANGED
@@ -2,16 +2,16 @@ import { NextConfig } from 'next';
2
2
  export { UniformServerConfig } from '@uniformdev/next-app-router-shared';
3
3
 
4
4
  /**
5
- * Wraps the Next.js config to set up the Uniform server config alias.
5
+ * Wraps the Next.js config to set up Uniform webpack aliases.
6
6
  *
7
+ * Always aliases the unused optional `ws` peer from `@vercel/functions`.
7
8
  * If a `uniform.server.config.{js,cjs,mjs,ts}` file exists in the project root,
8
- * this sets up an alias so that `@uniformdev/next-app-router/config/resolved`
9
- * imports the user's config instead of the default.
9
+ * this also aliases `@uniformdev/next-app-router/config/resolved` to that file.
10
10
  *
11
- * This wrapper is optional - without it, the default config will be used.
11
+ * This wrapper is optional - without it, the default server config will be used.
12
12
  *
13
13
  * @param nextConfig - The Next.js configuration object
14
- * @returns The modified Next.js configuration with Uniform config alias set up
14
+ * @returns The modified Next.js configuration
15
15
  */
16
16
  declare const withUniformConfig: (nextConfig: NextConfig) => NextConfig;
17
17
 
package/dist/config.d.ts CHANGED
@@ -2,16 +2,16 @@ import { NextConfig } from 'next';
2
2
  export { UniformServerConfig } from '@uniformdev/next-app-router-shared';
3
3
 
4
4
  /**
5
- * Wraps the Next.js config to set up the Uniform server config alias.
5
+ * Wraps the Next.js config to set up Uniform webpack aliases.
6
6
  *
7
+ * Always aliases the unused optional `ws` peer from `@vercel/functions`.
7
8
  * If a `uniform.server.config.{js,cjs,mjs,ts}` file exists in the project root,
8
- * this sets up an alias so that `@uniformdev/next-app-router/config/resolved`
9
- * imports the user's config instead of the default.
9
+ * this also aliases `@uniformdev/next-app-router/config/resolved` to that file.
10
10
  *
11
- * This wrapper is optional - without it, the default config will be used.
11
+ * This wrapper is optional - without it, the default server config will be used.
12
12
  *
13
13
  * @param nextConfig - The Next.js configuration object
14
- * @returns The modified Next.js configuration with Uniform config alias set up
14
+ * @returns The modified Next.js configuration
15
15
  */
16
16
  declare const withUniformConfig: (nextConfig: NextConfig) => NextConfig;
17
17
 
package/dist/config.js CHANGED
@@ -40,25 +40,29 @@ var getConfigPath = () => {
40
40
  var withUniformConfig = (nextConfig) => {
41
41
  var _a;
42
42
  const configPath = getConfigPath();
43
- if (!configPath) {
44
- return nextConfig;
43
+ if (configPath) {
44
+ console.log("Using Uniform config from", configPath.fileName);
45
45
  }
46
- console.log("Using Uniform config from", configPath.fileName);
47
- const turbopackResolveAlias = {
48
- ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias,
49
- [CONFIG_IMPORT_PATH]: `./${configPath.fileName}`
50
- };
51
46
  return {
52
47
  ...nextConfig,
53
- turbopack: {
54
- ...nextConfig.turbopack,
55
- resolveAlias: turbopackResolveAlias
56
- },
48
+ ...configPath ? {
49
+ turbopack: {
50
+ ...nextConfig.turbopack,
51
+ resolveAlias: {
52
+ ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias,
53
+ [CONFIG_IMPORT_PATH]: `./${configPath.fileName}`
54
+ }
55
+ }
56
+ } : {},
57
57
  webpack: (config, context) => {
58
58
  if (nextConfig.webpack) {
59
59
  nextConfig.webpack(config, context);
60
60
  }
61
- if (context.isServer) {
61
+ config.resolve.alias = {
62
+ ...config.resolve.alias,
63
+ ws: false
64
+ };
65
+ if (configPath && context.isServer) {
62
66
  config.resolve.alias[CONFIG_IMPORT_PATH] = (0, import_path.resolve)(config.context, configPath.filePath);
63
67
  }
64
68
  return config;
package/dist/config.mjs CHANGED
@@ -16,25 +16,29 @@ var getConfigPath = () => {
16
16
  var withUniformConfig = (nextConfig) => {
17
17
  var _a;
18
18
  const configPath = getConfigPath();
19
- if (!configPath) {
20
- return nextConfig;
19
+ if (configPath) {
20
+ console.log("Using Uniform config from", configPath.fileName);
21
21
  }
22
- console.log("Using Uniform config from", configPath.fileName);
23
- const turbopackResolveAlias = {
24
- ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias,
25
- [CONFIG_IMPORT_PATH]: `./${configPath.fileName}`
26
- };
27
22
  return {
28
23
  ...nextConfig,
29
- turbopack: {
30
- ...nextConfig.turbopack,
31
- resolveAlias: turbopackResolveAlias
32
- },
24
+ ...configPath ? {
25
+ turbopack: {
26
+ ...nextConfig.turbopack,
27
+ resolveAlias: {
28
+ ...(_a = nextConfig.turbopack) == null ? void 0 : _a.resolveAlias,
29
+ [CONFIG_IMPORT_PATH]: `./${configPath.fileName}`
30
+ }
31
+ }
32
+ } : {},
33
33
  webpack: (config, context) => {
34
34
  if (nextConfig.webpack) {
35
35
  nextConfig.webpack(config, context);
36
36
  }
37
- if (context.isServer) {
37
+ config.resolve.alias = {
38
+ ...config.resolve.alias,
39
+ ws: false
40
+ };
41
+ if (configPath && context.isServer) {
38
42
  config.resolve.alias[CONFIG_IMPORT_PATH] = resolve(config.context, configPath.filePath);
39
43
  }
40
44
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/next-app-router",
3
- "version": "20.74.6-alpha.1+4cdd3b417d",
3
+ "version": "20.74.6-alpha.2+d9426e9b81",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "scripts": {
6
6
  "build": "tsup",
@@ -100,12 +100,12 @@
100
100
  "vitest": "4.1.9"
101
101
  },
102
102
  "dependencies": {
103
- "@uniformdev/canvas-react": "20.74.6-alpha.1+4cdd3b417d",
104
- "@uniformdev/next-app-router-client": "20.74.6-alpha.1+4cdd3b417d",
105
- "@uniformdev/next-app-router-shared": "20.74.6-alpha.1+4cdd3b417d",
106
- "@uniformdev/redirect": "20.74.6-alpha.1+4cdd3b417d",
107
- "@uniformdev/richtext": "20.74.6-alpha.1+4cdd3b417d",
108
- "@uniformdev/webhooks": "20.74.6-alpha.1+4cdd3b417d",
103
+ "@uniformdev/canvas-react": "20.74.6-alpha.2+d9426e9b81",
104
+ "@uniformdev/next-app-router-client": "20.74.6-alpha.2+d9426e9b81",
105
+ "@uniformdev/next-app-router-shared": "20.74.6-alpha.2+d9426e9b81",
106
+ "@uniformdev/redirect": "20.74.6-alpha.2+d9426e9b81",
107
+ "@uniformdev/richtext": "20.74.6-alpha.2+d9426e9b81",
108
+ "@uniformdev/webhooks": "20.74.6-alpha.2+d9426e9b81",
109
109
  "@vercel/functions": "^3.7.2",
110
110
  "encoding": "^0.1.13",
111
111
  "server-only": "^0.0.1",
@@ -122,5 +122,5 @@
122
122
  "publishConfig": {
123
123
  "access": "public"
124
124
  },
125
- "gitHead": "4cdd3b417d4e8dbedf060014c9a3eb88ee44a4d4"
125
+ "gitHead": "d9426e9b81a6943318d903c723f23f3c0cbb17ad"
126
126
  }