next-with-linaria 1.2.0 → 1.3.0

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/README.md CHANGED
@@ -10,6 +10,9 @@ This package provides seamless integration between Next.js and Linaria, a zero-r
10
10
 
11
11
  ## Installation
12
12
 
13
+ > [!IMPORTANT]
14
+ > Next.js 16 requires next-with-linaria version 1.3.0 or higher.
15
+
13
16
  <details open><summary>npm</summary>
14
17
 
15
18
  ```sh
@@ -1,6 +1,5 @@
1
1
  import { WithLinariaConfig } from './types';
2
2
  export declare function addTurbopackConfig({ linaria: linariaOptions, ...config }: WithLinariaConfig): {
3
- [x: string]: any;
4
3
  allowedDevOrigins?: string[];
5
4
  exportPathMap?: (defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
6
5
  dev: boolean;
@@ -10,15 +9,19 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
10
9
  buildId: string;
11
10
  }) => Promise<import("next/dist/server/config-shared").ExportPathMap> | import("next/dist/server/config-shared").ExportPathMap;
12
11
  i18n?: import("next/dist/server/config-shared").I18NConfig | null;
13
- eslint?: import("next/dist/server/config-shared").ESLintConfig;
14
12
  typescript?: import("next/dist/server/config-shared").TypeScriptConfig;
15
- headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]>;
13
+ typedRoutes?: boolean;
14
+ headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
16
15
  rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
17
16
  beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
18
17
  afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
19
18
  fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
20
- }>;
21
- redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]>;
19
+ }> | import("next/dist/lib/load-custom-routes").Rewrite[] | {
20
+ beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
21
+ afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
22
+ fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
23
+ };
24
+ redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]> | import("next/dist/lib/load-custom-routes").Redirect[];
22
25
  excludeDefaultMomentLocales?: boolean;
23
26
  webpack?: import("next/dist/server/config-shared").NextJsWebpackConfig | null;
24
27
  trailingSlash?: boolean;
@@ -27,6 +30,12 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
27
30
  cleanDistDir?: boolean;
28
31
  assetPrefix?: string;
29
32
  cacheHandler?: string | undefined;
33
+ cacheHandlers?: {
34
+ default?: string;
35
+ remote?: string;
36
+ static?: string;
37
+ [handlerName: string]: string | undefined;
38
+ };
30
39
  cacheMaxMemorySize?: number;
31
40
  useFileSystemPublicRoutes?: boolean;
32
41
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -36,18 +45,12 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
36
45
  poweredByHeader?: boolean;
37
46
  images?: import("next/dist/shared/lib/image-config").ImageConfig;
38
47
  devIndicators?: false | {
39
- appIsrStatus?: boolean;
40
- buildActivity?: boolean;
41
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
42
48
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
43
49
  };
44
50
  onDemandEntries?: {
45
51
  maxInactiveAge?: number;
46
52
  pagesBufferLength?: number;
47
53
  };
48
- amp?: {
49
- canonicalBase?: string;
50
- };
51
54
  deploymentId?: string;
52
55
  basePath?: string;
53
56
  sassOptions?: {
@@ -55,15 +58,10 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
55
58
  [key: string]: any;
56
59
  };
57
60
  productionBrowserSourceMaps?: boolean;
61
+ reactCompiler?: boolean | import("next/dist/server/config-shared").ReactCompilerOptions;
58
62
  reactProductionProfiling?: boolean;
59
63
  reactStrictMode?: boolean | null;
60
64
  reactMaxHeadersLength?: number;
61
- publicRuntimeConfig?: {
62
- [key: string]: any;
63
- };
64
- serverRuntimeConfig?: {
65
- [key: string]: any;
66
- };
67
65
  httpAgentOptions?: {
68
66
  keepAlive?: boolean;
69
67
  };
@@ -98,6 +96,7 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
98
96
  transpilePackages?: string[];
99
97
  turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
100
98
  skipMiddlewareUrlNormalize?: boolean;
99
+ skipProxyUrlNormalize?: boolean;
101
100
  skipTrailingSlashRedirect?: boolean;
102
101
  modularizeImports?: Record<string, {
103
102
  transform: string | Record<string, string>;
@@ -105,6 +104,15 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
105
104
  skipDefaultConversion?: boolean;
106
105
  }>;
107
106
  logging?: import("next/dist/server/config-shared").LoggingConfig | false;
107
+ enablePrerenderSourceMaps?: boolean;
108
+ cacheComponents?: boolean;
109
+ cacheLife?: {
110
+ [profile: string]: {
111
+ stale?: number;
112
+ revalidate?: number;
113
+ expire?: number;
114
+ };
115
+ };
108
116
  expireTime?: number;
109
117
  experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
110
118
  bundlePagesRouterDependencies?: boolean;
@@ -17,23 +17,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.addTurbopackConfig = addTurbopackConfig;
18
18
  const path_1 = __importDefault(require("path"));
19
19
  function addTurbopackConfig(_a) {
20
- var _b, _c, _d;
21
- var _e, _f;
20
+ var _b, _c;
21
+ var _d;
22
22
  var { linaria: linariaOptions } = _a, config = __rest(_a, ["linaria"]);
23
23
  (_b = config.turbopack) !== null && _b !== void 0 ? _b : (config.turbopack = {});
24
- (_c = (_e = config.turbopack).rules) !== null && _c !== void 0 ? _c : (_e.rules = {});
24
+ (_c = (_d = config.turbopack).rules) !== null && _c !== void 0 ? _c : (_d.rules = {});
25
25
  const linariaLoader = {
26
26
  loader: path_1.default.resolve(__dirname, './loaders/turbopack-transform-loader'),
27
27
  options: Object.assign(Object.assign({ sourceMap: process.env.NODE_ENV !== 'production', displayName: process.env.NODE_ENV !== 'production' }, linariaOptions), { babelOptions: {
28
28
  presets: ['next/babel', '@wyw-in-js'],
29
29
  } }),
30
30
  };
31
- const conditionId = '#linaria-loader';
32
- (_d = (_f = config.turbopack).conditions) !== null && _d !== void 0 ? _d : (_f.conditions = {});
33
- config.turbopack.conditions[conditionId] = {
34
- path: /^(?!.*middleware\.(tsx?|jsx?)$).*\.(tsx?|jsx?)$/,
35
- };
36
- config.turbopack.rules[conditionId] = {
31
+ config.turbopack.rules['*.{ts,tsx,js,jsx}'] = {
32
+ condition: {
33
+ not: { path: /middleware\.(tsx?|jsx?)$/ },
34
+ },
37
35
  loaders: [linariaLoader],
38
36
  };
39
37
  return config;
@@ -1 +1 @@
1
- {"version":3,"file":"add-turbopack-config.js","sourceRoot":"","sources":["../src/add-turbopack-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,gDAiDC;AArDD,gDAAwB;AAIxB,SAAgB,kBAAkB,CAAC,EAGf;;;QAHe,EACjC,OAAO,EAAE,cAAc,OAEL,EADf,MAAM,cAFwB,WAGlC,CADU;IAET,MAAA,MAAM,CAAC,SAAS,oCAAhB,MAAM,CAAC,SAAS,GAAK,EAAE,EAAC;IACxB,YAAA,MAAM,CAAC,SAAS,EAAC,KAAK,uCAAL,KAAK,GAAK,EAAE,EAAC;IAE9B,MAAM,aAAa,GAAG;QACpB,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,sCAAsC,CAAC;QACvE,OAAO,gCACL,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAChD,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,IAC/C,cAAc,KACjB,YAAY,EAAE;gBACZ,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;aACtC,GACF;KACF,CAAC;IAg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,CAAC;KACzB,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -19,15 +19,19 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
19
19
  buildId: string;
20
20
  }) => Promise<NextServer.ExportPathMap> | NextServer.ExportPathMap;
21
21
  i18n?: NextServer.I18NConfig | null;
22
- eslint?: NextServer.ESLintConfig;
23
22
  typescript?: NextServer.TypeScriptConfig;
24
- headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]>;
23
+ typedRoutes?: boolean;
24
+ headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
25
25
  rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
26
26
  beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
27
27
  afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
28
28
  fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
29
- }>;
30
- redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]>;
29
+ }> | import("next/dist/lib/load-custom-routes").Rewrite[] | {
30
+ beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
31
+ afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
32
+ fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
33
+ };
34
+ redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]> | import("next/dist/lib/load-custom-routes").Redirect[];
31
35
  excludeDefaultMomentLocales?: boolean;
32
36
  trailingSlash?: boolean;
33
37
  env?: Record<string, string | undefined>;
@@ -35,6 +39,12 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
35
39
  cleanDistDir?: boolean;
36
40
  assetPrefix?: string;
37
41
  cacheHandler?: string | undefined;
42
+ cacheHandlers?: {
43
+ default?: string;
44
+ remote?: string;
45
+ static?: string;
46
+ [handlerName: string]: string | undefined;
47
+ };
38
48
  cacheMaxMemorySize?: number;
39
49
  useFileSystemPublicRoutes?: boolean;
40
50
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -44,18 +54,12 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
44
54
  poweredByHeader?: boolean;
45
55
  images?: import("next/dist/shared/lib/image-config").ImageConfig;
46
56
  devIndicators?: false | {
47
- appIsrStatus?: boolean;
48
- buildActivity?: boolean;
49
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
50
57
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
51
58
  };
52
59
  onDemandEntries?: {
53
60
  maxInactiveAge?: number;
54
61
  pagesBufferLength?: number;
55
62
  };
56
- amp?: {
57
- canonicalBase?: string;
58
- };
59
63
  deploymentId?: string;
60
64
  basePath?: string;
61
65
  sassOptions?: {
@@ -63,15 +67,10 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
63
67
  [key: string]: any;
64
68
  };
65
69
  productionBrowserSourceMaps?: boolean;
70
+ reactCompiler?: boolean | NextServer.ReactCompilerOptions;
66
71
  reactProductionProfiling?: boolean;
67
72
  reactStrictMode?: boolean | null;
68
73
  reactMaxHeadersLength?: number;
69
- publicRuntimeConfig?: {
70
- [key: string]: any;
71
- };
72
- serverRuntimeConfig?: {
73
- [key: string]: any;
74
- };
75
74
  httpAgentOptions?: {
76
75
  keepAlive?: boolean;
77
76
  };
@@ -106,6 +105,7 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
106
105
  transpilePackages?: string[];
107
106
  turbopack?: NextServer.TurbopackOptions;
108
107
  skipMiddlewareUrlNormalize?: boolean;
108
+ skipProxyUrlNormalize?: boolean;
109
109
  skipTrailingSlashRedirect?: boolean;
110
110
  modularizeImports?: Record<string, {
111
111
  transform: string | Record<string, string>;
@@ -113,6 +113,15 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
113
113
  skipDefaultConversion?: boolean;
114
114
  }>;
115
115
  logging?: NextServer.LoggingConfig | false;
116
+ enablePrerenderSourceMaps?: boolean;
117
+ cacheComponents?: boolean;
118
+ cacheLife?: {
119
+ [profile: string]: {
120
+ stale?: number;
121
+ revalidate?: number;
122
+ expire?: number;
123
+ };
124
+ };
116
125
  expireTime?: number;
117
126
  experimental?: NextServer.ExperimentalConfig;
118
127
  bundlePagesRouterDependencies?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"add-webpack-config.js","sourceRoot":"","sources":["../src/add-webpack-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgFA,4CA+CC;AA5HD,gDAAwB;AAGxB,6CAI0B;AAE1B,yDAAiE;AAOjE,SAAS,qBAAqB,CAAC,KAA4B;IACzD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,IAAA,2BAAW,EAAC,IAAI,CAAC,EAAE,CAAC;YACtB,IAAI,IAAA,2BAAW,EAAC,IAAI,CAAC,EAAE,CAAC;gBACtB,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;gBAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;gBAG3C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;oBACnC,MAAM,QAAQ,GAAG,qCAA4B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACzD,IAAI,QAAQ,EAAE,CAAC;wBACb,OAAO,OAAO,CAAC;oBACjB,CAAC;oBACD,OAAO,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACpE,CAAC,CAAC;gBAIF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,GAAG,CACnC,OAAO,EACP,CAAC,EACD,UAAU,EACV,GAAG,IAAI,E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AO,GAAG,CACd,MAA6B,EAC7B,OAAwC,EACxC,EAAE;;QACF,IAAI,CAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,KAAK,KAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAC3C,qBAAqB,CAAC,MAAM,CAAC,MAAM,CAAC,KAA8B,CAAC,CAAC;YAIpE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,wBAAe;gBACrB,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,qCAAqC,CAAC;gBACtE,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE,cAAc;aACxB,CAAC,CAAC;YAGH,MAAM,oBAAoB,mBACxB,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAChD,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAClD,YAAY,EAAE;oBACZ,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;iBACtC,IACE,OAAO,CACX,CAAC;YACF,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;gBACvB,IAAI,EAAE,wBAAwB;gBAC9B,OAAO,EAAE,cAAc;gBACvB,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oCAAoC,CAAC;gBACrE,OAAO,EAAE,oBAAoB;aAC9B,CAAC,CAAC;QACL,CAAC;QAED,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;YAC7C,OAAO,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,uCACK,UAAU,KACb,OAAO,IACP;AACJ,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import type { WithLinariaConfig } from './types';
2
2
  export type LinariaConfig = WithLinariaConfig;
3
3
  export default function withLinaria(config: WithLinariaConfig): {
4
- [x: string]: any;
5
4
  allowedDevOrigins?: string[];
6
5
  exportPathMap?: (defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
7
6
  dev: boolean;
@@ -11,15 +10,19 @@ export default function withLinaria(config: WithLinariaConfig): {
11
10
  buildId: string;
12
11
  }) => Promise<import("next/dist/server/config-shared").ExportPathMap> | import("next/dist/server/config-shared").ExportPathMap;
13
12
  i18n?: import("next/dist/server/config-shared").I18NConfig | null;
14
- eslint?: import("next/dist/server/config-shared").ESLintConfig;
15
13
  typescript?: import("next/dist/server/config-shared").TypeScriptConfig;
16
- headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]>;
14
+ typedRoutes?: boolean;
15
+ headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
17
16
  rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
18
17
  beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
19
18
  afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
20
19
  fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
21
- }>;
22
- redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]>;
20
+ }> | import("next/dist/lib/load-custom-routes").Rewrite[] | {
21
+ beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
22
+ afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
23
+ fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
24
+ };
25
+ redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]> | import("next/dist/lib/load-custom-routes").Redirect[];
23
26
  excludeDefaultMomentLocales?: boolean;
24
27
  webpack?: import("next/dist/server/config-shared").NextJsWebpackConfig | null;
25
28
  trailingSlash?: boolean;
@@ -28,6 +31,12 @@ export default function withLinaria(config: WithLinariaConfig): {
28
31
  cleanDistDir?: boolean;
29
32
  assetPrefix?: string;
30
33
  cacheHandler?: string | undefined;
34
+ cacheHandlers?: {
35
+ default?: string;
36
+ remote?: string;
37
+ static?: string;
38
+ [handlerName: string]: string | undefined;
39
+ };
31
40
  cacheMaxMemorySize?: number;
32
41
  useFileSystemPublicRoutes?: boolean;
33
42
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -37,18 +46,12 @@ export default function withLinaria(config: WithLinariaConfig): {
37
46
  poweredByHeader?: boolean;
38
47
  images?: import("next/dist/shared/lib/image-config").ImageConfig;
39
48
  devIndicators?: false | {
40
- appIsrStatus?: boolean;
41
- buildActivity?: boolean;
42
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
43
49
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
44
50
  };
45
51
  onDemandEntries?: {
46
52
  maxInactiveAge?: number;
47
53
  pagesBufferLength?: number;
48
54
  };
49
- amp?: {
50
- canonicalBase?: string;
51
- };
52
55
  deploymentId?: string;
53
56
  basePath?: string;
54
57
  sassOptions?: {
@@ -56,15 +59,10 @@ export default function withLinaria(config: WithLinariaConfig): {
56
59
  [key: string]: any;
57
60
  };
58
61
  productionBrowserSourceMaps?: boolean;
62
+ reactCompiler?: boolean | import("next/dist/server/config-shared").ReactCompilerOptions;
59
63
  reactProductionProfiling?: boolean;
60
64
  reactStrictMode?: boolean | null;
61
65
  reactMaxHeadersLength?: number;
62
- publicRuntimeConfig?: {
63
- [key: string]: any;
64
- };
65
- serverRuntimeConfig?: {
66
- [key: string]: any;
67
- };
68
66
  httpAgentOptions?: {
69
67
  keepAlive?: boolean;
70
68
  };
@@ -99,6 +97,7 @@ export default function withLinaria(config: WithLinariaConfig): {
99
97
  transpilePackages?: string[];
100
98
  turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
101
99
  skipMiddlewareUrlNormalize?: boolean;
100
+ skipProxyUrlNormalize?: boolean;
102
101
  skipTrailingSlashRedirect?: boolean;
103
102
  modularizeImports?: Record<string, {
104
103
  transform: string | Record<string, string>;
@@ -106,6 +105,15 @@ export default function withLinaria(config: WithLinariaConfig): {
106
105
  skipDefaultConversion?: boolean;
107
106
  }>;
108
107
  logging?: import("next/dist/server/config-shared").LoggingConfig | false;
108
+ enablePrerenderSourceMaps?: boolean;
109
+ cacheComponents?: boolean;
110
+ cacheLife?: {
111
+ [profile: string]: {
112
+ stale?: number;
113
+ revalidate?: number;
114
+ expire?: number;
115
+ };
116
+ };
109
117
  expireTime?: number;
110
118
  experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
111
119
  bundlePagesRouterDependencies?: boolean;
@@ -128,15 +136,19 @@ export default function withLinaria(config: WithLinariaConfig): {
128
136
  buildId: string;
129
137
  }) => Promise<import("next/dist/server/config-shared").ExportPathMap> | import("next/dist/server/config-shared").ExportPathMap;
130
138
  i18n?: import("next/dist/server/config-shared").I18NConfig | null;
131
- eslint?: import("next/dist/server/config-shared").ESLintConfig;
132
139
  typescript?: import("next/dist/server/config-shared").TypeScriptConfig;
133
- headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]>;
140
+ typedRoutes?: boolean;
141
+ headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
134
142
  rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
135
143
  beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
136
144
  afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
137
145
  fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
138
- }>;
139
- redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]>;
146
+ }> | import("next/dist/lib/load-custom-routes").Rewrite[] | {
147
+ beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
148
+ afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
149
+ fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
150
+ };
151
+ redirects?: () => Promise<import("next/dist/lib/load-custom-routes").Redirect[]> | import("next/dist/lib/load-custom-routes").Redirect[];
140
152
  excludeDefaultMomentLocales?: boolean;
141
153
  trailingSlash?: boolean;
142
154
  env?: Record<string, string | undefined>;
@@ -144,6 +156,12 @@ export default function withLinaria(config: WithLinariaConfig): {
144
156
  cleanDistDir?: boolean;
145
157
  assetPrefix?: string;
146
158
  cacheHandler?: string | undefined;
159
+ cacheHandlers?: {
160
+ default?: string;
161
+ remote?: string;
162
+ static?: string;
163
+ [handlerName: string]: string | undefined;
164
+ };
147
165
  cacheMaxMemorySize?: number;
148
166
  useFileSystemPublicRoutes?: boolean;
149
167
  generateBuildId?: () => string | null | Promise<string | null>;
@@ -153,18 +171,12 @@ export default function withLinaria(config: WithLinariaConfig): {
153
171
  poweredByHeader?: boolean;
154
172
  images?: import("next/dist/shared/lib/image-config").ImageConfig;
155
173
  devIndicators?: false | {
156
- appIsrStatus?: boolean;
157
- buildActivity?: boolean;
158
- buildActivityPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
159
174
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
160
175
  };
161
176
  onDemandEntries?: {
162
177
  maxInactiveAge?: number;
163
178
  pagesBufferLength?: number;
164
179
  };
165
- amp?: {
166
- canonicalBase?: string;
167
- };
168
180
  deploymentId?: string;
169
181
  basePath?: string;
170
182
  sassOptions?: {
@@ -172,15 +184,10 @@ export default function withLinaria(config: WithLinariaConfig): {
172
184
  [key: string]: any;
173
185
  };
174
186
  productionBrowserSourceMaps?: boolean;
187
+ reactCompiler?: boolean | import("next/dist/server/config-shared").ReactCompilerOptions;
175
188
  reactProductionProfiling?: boolean;
176
189
  reactStrictMode?: boolean | null;
177
190
  reactMaxHeadersLength?: number;
178
- publicRuntimeConfig?: {
179
- [key: string]: any;
180
- };
181
- serverRuntimeConfig?: {
182
- [key: string]: any;
183
- };
184
191
  httpAgentOptions?: {
185
192
  keepAlive?: boolean;
186
193
  };
@@ -215,6 +222,7 @@ export default function withLinaria(config: WithLinariaConfig): {
215
222
  transpilePackages?: string[];
216
223
  turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
217
224
  skipMiddlewareUrlNormalize?: boolean;
225
+ skipProxyUrlNormalize?: boolean;
218
226
  skipTrailingSlashRedirect?: boolean;
219
227
  modularizeImports?: Record<string, {
220
228
  transform: string | Record<string, string>;
@@ -222,6 +230,15 @@ export default function withLinaria(config: WithLinariaConfig): {
222
230
  skipDefaultConversion?: boolean;
223
231
  }>;
224
232
  logging?: import("next/dist/server/config-shared").LoggingConfig | false;
233
+ enablePrerenderSourceMaps?: boolean;
234
+ cacheComponents?: boolean;
235
+ cacheLife?: {
236
+ [profile: string]: {
237
+ stale?: number;
238
+ revalidate?: number;
239
+ expire?: number;
240
+ };
241
+ };
225
242
  expireTime?: number;
226
243
  experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
227
244
  bundlePagesRouterDependencies?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-with-linaria",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Linaria support for Next.js App Router",
5
5
  "main": "lib/with-linaria.js",
6
6
  "scripts": {
@@ -13,25 +13,26 @@
13
13
  },
14
14
  "packageManager": "pnpm@8.15.0",
15
15
  "devDependencies": {
16
- "@rspack/core": "1.3.3",
16
+ "@rspack/core": "1.5.5",
17
17
  "@types/fs-extra": "11.0.4",
18
- "@typescript-eslint/eslint-plugin": "8.28.0",
19
- "@typescript-eslint/parser": "8.28.0",
20
- "@wyw-in-js/babel-preset": "0.6.0",
21
- "@wyw-in-js/transform": "0.6.0",
22
- "eslint": "8.56.0",
23
- "eslint-config-prettier": "10.1.1",
24
- "eslint-plugin-prettier": "5.2.5",
18
+ "@typescript-eslint/eslint-plugin": "8.44.0",
19
+ "@typescript-eslint/parser": "8.44.0",
20
+ "@wyw-in-js/babel-preset": "0.7.0",
21
+ "@wyw-in-js/transform": "0.7.0",
22
+ "eslint": "9.35.0",
23
+ "eslint-config-prettier": "10.1.8",
24
+ "eslint-plugin-prettier": "5.5.4",
25
25
  "eslint-plugin-simple-import-sort": "12.1.1",
26
26
  "eslint-plugin-typescript-sort-keys": "3.3.0",
27
- "eslint-plugin-unused-imports": "4.1.4",
27
+ "eslint-plugin-unused-imports": "4.2.0",
28
+ "globals": "16.4.0",
28
29
  "is-ci": "4.1.0",
29
- "lint-staged": "15.5.0",
30
- "next": "15.4.0-canary.81",
31
- "prettier": "3.5.3",
32
- "simple-git-hooks": "2.12.1",
33
- "typescript": "5.8.2",
34
- "webpack": "5.98.0"
30
+ "lint-staged": "16.1.6",
31
+ "next": "16.0.0",
32
+ "prettier": "3.6.2",
33
+ "simple-git-hooks": "2.13.1",
34
+ "typescript": "5.9.2",
35
+ "webpack": "5.101.3"
35
36
  },
36
37
  "peerDependencies": {
37
38
  "@babel/runtime": "7.x",