next-with-linaria 1.3.0 → 1.5.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 +1 -1
- package/lib/add-turbopack-config.d.ts +12 -6
- package/lib/add-turbopack-config.js.map +1 -1
- package/lib/add-webpack-config.d.ts +13 -7
- package/lib/add-webpack-config.js.map +1 -1
- package/lib/loaders/turbopack-transform-loader.js +2 -1
- package/lib/loaders/turbopack-transform-loader.js.map +1 -1
- package/lib/loaders/webpack-output-css-loader.js.map +1 -1
- package/lib/loaders/webpack-transform-loader.js +57 -12
- package/lib/loaders/webpack-transform-loader.js.map +1 -1
- package/lib/utils/fast-check.js.map +1 -1
- package/lib/utils/insert-import.js.map +1 -1
- package/lib/utils/logger.js.map +1 -1
- package/lib/utils/source-map.js.map +1 -1
- package/lib/utils/webpack-utils.js.map +1 -1
- package/lib/with-linaria.d.ts +1 -251
- package/lib/with-linaria.js +4 -7
- package/lib/with-linaria.js.map +1 -1
- package/package.json +21 -25
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const config: LinariaConfig = {
|
|
|
69
69
|
},
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
export default withRspack(
|
|
72
|
+
export default withLinaria(withRspack(config));
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Now you can use linaria in all the places where Next.js also allows you to use [CSS Modules](https://beta.nextjs.org/docs/styling/css-modules). That currently means in every file in the `app` directory and the `pages` directory.
|
|
@@ -30,6 +30,7 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
30
30
|
cleanDistDir?: boolean;
|
|
31
31
|
assetPrefix?: string;
|
|
32
32
|
cacheHandler?: string | undefined;
|
|
33
|
+
adapterPath?: string;
|
|
33
34
|
cacheHandlers?: {
|
|
34
35
|
default?: string;
|
|
35
36
|
remote?: string;
|
|
@@ -41,17 +42,19 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
41
42
|
generateBuildId?: () => string | null | Promise<string | null>;
|
|
42
43
|
generateEtags?: boolean;
|
|
43
44
|
pageExtensions?: string[];
|
|
45
|
+
instrumentationClientInject?: string[];
|
|
44
46
|
compress?: boolean;
|
|
45
47
|
poweredByHeader?: boolean;
|
|
46
48
|
images?: import("next/dist/shared/lib/image-config").ImageConfig;
|
|
47
49
|
devIndicators?: false | {
|
|
48
|
-
position?:
|
|
50
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
49
51
|
};
|
|
50
52
|
onDemandEntries?: {
|
|
51
53
|
maxInactiveAge?: number;
|
|
52
54
|
pagesBufferLength?: number;
|
|
53
55
|
};
|
|
54
56
|
deploymentId?: string;
|
|
57
|
+
supportsImmutableAssets?: boolean;
|
|
55
58
|
basePath?: string;
|
|
56
59
|
sassOptions?: {
|
|
57
60
|
implementation?: string;
|
|
@@ -66,7 +69,7 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
66
69
|
keepAlive?: boolean;
|
|
67
70
|
};
|
|
68
71
|
staticPageGenerationTimeout?: number;
|
|
69
|
-
crossOrigin?:
|
|
72
|
+
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
70
73
|
compiler?: {
|
|
71
74
|
reactRemoveProperties?: boolean | {
|
|
72
75
|
properties?: string[];
|
|
@@ -74,7 +77,7 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
74
77
|
relay?: {
|
|
75
78
|
src: string;
|
|
76
79
|
artifactDirectory?: string;
|
|
77
|
-
language?:
|
|
80
|
+
language?: 'typescript' | 'javascript' | 'flow';
|
|
78
81
|
eagerEsModules?: boolean;
|
|
79
82
|
};
|
|
80
83
|
removeConsole?: boolean | {
|
|
@@ -85,14 +88,14 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
85
88
|
styledJsx?: boolean | {
|
|
86
89
|
useLightningcss?: boolean;
|
|
87
90
|
};
|
|
88
|
-
define?: Record<string, string>;
|
|
89
|
-
defineServer?: Record<string, string>;
|
|
91
|
+
define?: Record<string, string | number | boolean>;
|
|
92
|
+
defineServer?: Record<string, string | number | boolean>;
|
|
90
93
|
runAfterProductionCompile?: (metadata: {
|
|
91
94
|
projectDir: string;
|
|
92
95
|
distDir: string;
|
|
93
96
|
}) => Promise<void>;
|
|
94
97
|
};
|
|
95
|
-
output?:
|
|
98
|
+
output?: 'standalone' | 'export';
|
|
96
99
|
transpilePackages?: string[];
|
|
97
100
|
turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
|
|
98
101
|
skipMiddlewareUrlNormalize?: boolean;
|
|
@@ -106,6 +109,7 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
106
109
|
logging?: import("next/dist/server/config-shared").LoggingConfig | false;
|
|
107
110
|
enablePrerenderSourceMaps?: boolean;
|
|
108
111
|
cacheComponents?: boolean;
|
|
112
|
+
partialPrefetching?: boolean | 'unstable_eager';
|
|
109
113
|
cacheLife?: {
|
|
110
114
|
[profile: string]: {
|
|
111
115
|
stale?: number;
|
|
@@ -114,12 +118,14 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
114
118
|
};
|
|
115
119
|
};
|
|
116
120
|
expireTime?: number;
|
|
121
|
+
agentRules?: boolean;
|
|
117
122
|
experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
|
|
118
123
|
bundlePagesRouterDependencies?: boolean;
|
|
119
124
|
serverExternalPackages?: string[];
|
|
120
125
|
outputFileTracingRoot?: string;
|
|
121
126
|
outputFileTracingExcludes?: Record<string, string[]>;
|
|
122
127
|
outputFileTracingIncludes?: Record<string, string[]>;
|
|
128
|
+
outputHashSalt?: string;
|
|
123
129
|
watchOptions?: {
|
|
124
130
|
pollIntervalMs?: number;
|
|
125
131
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-turbopack-config.js","sourceRoot":"","sources":["../src/add-turbopack-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-turbopack-config.js","sourceRoot":"","sources":["../src/add-turbopack-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAIxB,4BAAmC,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;IAEF,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,mBAAmB,CAAC,GAAG;QAC5C,SAAS,EAAE;YAET,GAAG,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE;SAC1C;QACD,OAAO,EAAE,CAAC,aAAa,CAAC;KACzB,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -9,7 +9,6 @@ export type LinariaConfig = NextConfig & {
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConfig): {
|
|
12
|
-
webpack: (config: Webpack.Configuration, options: NextServer.WebpackConfigContext) => any;
|
|
13
12
|
allowedDevOrigins?: string[];
|
|
14
13
|
exportPathMap?: (defaultMap: NextServer.ExportPathMap, ctx: {
|
|
15
14
|
dev: boolean;
|
|
@@ -39,6 +38,7 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
39
38
|
cleanDistDir?: boolean;
|
|
40
39
|
assetPrefix?: string;
|
|
41
40
|
cacheHandler?: string | undefined;
|
|
41
|
+
adapterPath?: string;
|
|
42
42
|
cacheHandlers?: {
|
|
43
43
|
default?: string;
|
|
44
44
|
remote?: string;
|
|
@@ -50,17 +50,19 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
50
50
|
generateBuildId?: () => string | null | Promise<string | null>;
|
|
51
51
|
generateEtags?: boolean;
|
|
52
52
|
pageExtensions?: string[];
|
|
53
|
+
instrumentationClientInject?: string[];
|
|
53
54
|
compress?: boolean;
|
|
54
55
|
poweredByHeader?: boolean;
|
|
55
56
|
images?: import("next/dist/shared/lib/image-config").ImageConfig;
|
|
56
57
|
devIndicators?: false | {
|
|
57
|
-
position?:
|
|
58
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
58
59
|
};
|
|
59
60
|
onDemandEntries?: {
|
|
60
61
|
maxInactiveAge?: number;
|
|
61
62
|
pagesBufferLength?: number;
|
|
62
63
|
};
|
|
63
64
|
deploymentId?: string;
|
|
65
|
+
supportsImmutableAssets?: boolean;
|
|
64
66
|
basePath?: string;
|
|
65
67
|
sassOptions?: {
|
|
66
68
|
implementation?: string;
|
|
@@ -75,7 +77,7 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
75
77
|
keepAlive?: boolean;
|
|
76
78
|
};
|
|
77
79
|
staticPageGenerationTimeout?: number;
|
|
78
|
-
crossOrigin?:
|
|
80
|
+
crossOrigin?: 'anonymous' | 'use-credentials';
|
|
79
81
|
compiler?: {
|
|
80
82
|
reactRemoveProperties?: boolean | {
|
|
81
83
|
properties?: string[];
|
|
@@ -83,7 +85,7 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
83
85
|
relay?: {
|
|
84
86
|
src: string;
|
|
85
87
|
artifactDirectory?: string;
|
|
86
|
-
language?:
|
|
88
|
+
language?: 'typescript' | 'javascript' | 'flow';
|
|
87
89
|
eagerEsModules?: boolean;
|
|
88
90
|
};
|
|
89
91
|
removeConsole?: boolean | {
|
|
@@ -94,14 +96,14 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
94
96
|
styledJsx?: boolean | {
|
|
95
97
|
useLightningcss?: boolean;
|
|
96
98
|
};
|
|
97
|
-
define?: Record<string, string>;
|
|
98
|
-
defineServer?: Record<string, string>;
|
|
99
|
+
define?: Record<string, string | number | boolean>;
|
|
100
|
+
defineServer?: Record<string, string | number | boolean>;
|
|
99
101
|
runAfterProductionCompile?: (metadata: {
|
|
100
102
|
projectDir: string;
|
|
101
103
|
distDir: string;
|
|
102
104
|
}) => Promise<void>;
|
|
103
105
|
};
|
|
104
|
-
output?:
|
|
106
|
+
output?: 'standalone' | 'export';
|
|
105
107
|
transpilePackages?: string[];
|
|
106
108
|
turbopack?: NextServer.TurbopackOptions;
|
|
107
109
|
skipMiddlewareUrlNormalize?: boolean;
|
|
@@ -115,6 +117,7 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
115
117
|
logging?: NextServer.LoggingConfig | false;
|
|
116
118
|
enablePrerenderSourceMaps?: boolean;
|
|
117
119
|
cacheComponents?: boolean;
|
|
120
|
+
partialPrefetching?: boolean | 'unstable_eager';
|
|
118
121
|
cacheLife?: {
|
|
119
122
|
[profile: string]: {
|
|
120
123
|
stale?: number;
|
|
@@ -123,14 +126,17 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
123
126
|
};
|
|
124
127
|
};
|
|
125
128
|
expireTime?: number;
|
|
129
|
+
agentRules?: boolean;
|
|
126
130
|
experimental?: NextServer.ExperimentalConfig;
|
|
127
131
|
bundlePagesRouterDependencies?: boolean;
|
|
128
132
|
serverExternalPackages?: string[];
|
|
129
133
|
outputFileTracingRoot?: string;
|
|
130
134
|
outputFileTracingExcludes?: Record<string, string[]>;
|
|
131
135
|
outputFileTracingIncludes?: Record<string, string[]>;
|
|
136
|
+
outputHashSalt?: string;
|
|
132
137
|
watchOptions?: {
|
|
133
138
|
pollIntervalMs?: number;
|
|
134
139
|
};
|
|
135
140
|
htmlLimitedBots?: RegExp;
|
|
141
|
+
webpack: (config: Webpack.Configuration, options: NextServer.WebpackConfigContext) => any;
|
|
136
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-webpack-config.js","sourceRoot":"","sources":["../src/add-webpack-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-webpack-config.js","sourceRoot":"","sources":["../src/add-webpack-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,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,CAA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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"}
|
|
@@ -57,7 +57,8 @@ const turbopackTransformLoader = function (content, inputSourceMap) {
|
|
|
57
57
|
cache,
|
|
58
58
|
};
|
|
59
59
|
(0, transform_1.transform)(transformServices, contentStr, asyncResolve).then(async (result) => {
|
|
60
|
-
var _a
|
|
60
|
+
var _a;
|
|
61
|
+
var _b, _c, _d;
|
|
61
62
|
if (result.cssText) {
|
|
62
63
|
await Promise.all((_b = (_a = result.dependencies) === null || _a === void 0 ? void 0 : _a.map((dep) => asyncResolve(dep, this.resourcePath))) !== null && _b !== void 0 ? _b : []);
|
|
63
64
|
const css = Buffer.from(result.cssText).toString('base64');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turbopack-transform-loader.js","sourceRoot":"","sources":["../../src/loaders/turbopack-transform-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAA2E;
|
|
1
|
+
{"version":3,"file":"turbopack-transform-loader.js","sourceRoot":"","sources":["../../src/loaders/turbopack-transform-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAA2E;AAC3E,gDAAwB;AAIxB,oDAAuD;AACvD,0DAA+D;AAC/D,oDAAuD;AAQvD,MAAM,KAAK,GAAG,IAAI,oCAAwB,EAAE,CAAC;AAE7C,MAAM,wBAAwB,GAAe,UAC3C,OAAO,EACP,cAAc;IAEd,IAAI,CAAC,KAAK,EAAE,CAAC;IAEb,MAAM,KAIF,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAJrB,EACJ,SAAS,GAAG,IAAI,EAChB,QAAQ,GAAG,IAAI,OAEU,EADtB,aAAa,cAHZ,yBAIL,CAA0B,CAAC;IAE5B,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAGtC,IAAI,CAAC,IAAA,6BAAgB,EAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;QAC7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;QAChD,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAAG,KAAK,EACxB,KAAa,EACb,QAAgB,EACC,EAAE;QACnB,MAAM,OAAO,GAAG,cAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YACvC,CAAC,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YACxB,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC;YAEH,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAEpC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,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gCAAgC,GAAG,IAAI,CAAC;YAChE,MAAM,SAAS,GAAG,IAAA,qCAAqB,EAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAEtE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAE,MAAM,CAAC,SAAS,mCAAI,SAAS,CAAC,CAAC;YAC9D,OAAO;QACT,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAE,MAAM,CAAC,SAAS,mCAAI,SAAS,CAAC,CAAC;IAClE,CAAC,EACD,CAAC,GAAU,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CACnC,CAAC;AACJ,CAAC,CAAC;kBAEa,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-output-css-loader.js","sourceRoot":"","sources":["../../src/loaders/webpack-output-css-loader.ts"],"names":[],"mappings":";;;;;AAAA,0DAA6B;AAM7B,MAAM,eAAe,GAAe;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAE9B,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IAExD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,QAAQ,CAAC,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC,CAAC;QAC3D,OAAO;IACT,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,eAAe,GAAG,mBAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAEpD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"webpack-output-css-loader.js","sourceRoot":"","sources":["../../src/loaders/webpack-output-css-loader.ts"],"names":[],"mappings":";;;;;AAAA,0DAA6B;AAM7B,MAAM,eAAe,GAAe;IAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAE9B,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IAExD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,QAAQ,CAAC,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC,CAAC;QAC3D,OAAO;IACT,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC9C,MAAM,eAAe,GAAG,mBAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAEpD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC,CAAC;kBAEa,eAAe"}
|
|
@@ -22,6 +22,44 @@ const insert_import_1 = require("../utils/insert-import");
|
|
|
22
22
|
const source_map_1 = require("../utils/source-map");
|
|
23
23
|
const consts_1 = require("./consts");
|
|
24
24
|
const cache = new transform_1.TransformCacheCollection();
|
|
25
|
+
const resolvers = {};
|
|
26
|
+
const stripQueryAndHash = (request) => {
|
|
27
|
+
const queryIdx = request.indexOf('?');
|
|
28
|
+
const hashIdx = request.indexOf('#');
|
|
29
|
+
if (queryIdx === -1)
|
|
30
|
+
return hashIdx === -1 ? request : request.slice(0, hashIdx);
|
|
31
|
+
if (hashIdx === -1)
|
|
32
|
+
return request.slice(0, queryIdx);
|
|
33
|
+
return request.slice(0, Math.min(queryIdx, hashIdx));
|
|
34
|
+
};
|
|
35
|
+
const getResolverKey = (importer, stack) => {
|
|
36
|
+
const root = stack.length ? stack[stack.length - 1] : importer;
|
|
37
|
+
return stripQueryAndHash(root);
|
|
38
|
+
};
|
|
39
|
+
const asyncResolve = (what, importer, stack = [importer]) => {
|
|
40
|
+
const key = getResolverKey(importer, stack);
|
|
41
|
+
const resolver = resolvers[key];
|
|
42
|
+
if (!resolver || resolver.length === 0) {
|
|
43
|
+
throw new Error(`No resolver found for ${key}`);
|
|
44
|
+
}
|
|
45
|
+
return Promise.all(resolver.map((r) => r(what, importer, stack))).then((results) => {
|
|
46
|
+
const firstResult = results[0];
|
|
47
|
+
if (results.some((r) => r !== firstResult)) {
|
|
48
|
+
throw new Error('Resolvers returned different results');
|
|
49
|
+
}
|
|
50
|
+
return firstResult;
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
function addResolver(resourcePath, resolver) {
|
|
54
|
+
const key = stripQueryAndHash(resourcePath);
|
|
55
|
+
if (!resolvers[key]) {
|
|
56
|
+
resolvers[key] = [];
|
|
57
|
+
}
|
|
58
|
+
resolvers[key].push(resolver);
|
|
59
|
+
return () => {
|
|
60
|
+
resolvers[key] = resolvers[key].filter((r) => r !== resolver);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
25
63
|
const webpackTransformLoader = function (content, inputSourceMap) {
|
|
26
64
|
this.async();
|
|
27
65
|
const _a = this.getOptions() || {}, { fastCheck = true, prefixer = true } = _a, pluginOptions = __rest(_a, ["fastCheck", "prefixer"]);
|
|
@@ -30,26 +68,29 @@ const webpackTransformLoader = function (content, inputSourceMap) {
|
|
|
30
68
|
this.callback(null, contentStr, inputSourceMap);
|
|
31
69
|
return;
|
|
32
70
|
}
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
71
|
+
const removeResolver = addResolver(this.resourcePath, (what, importer) => {
|
|
72
|
+
const importerPath = stripQueryAndHash(importer);
|
|
73
|
+
const context = path_1.default.isAbsolute(importerPath)
|
|
74
|
+
? path_1.default.dirname(importerPath)
|
|
75
|
+
: path_1.default.join(process.cwd(), path_1.default.dirname(importerPath));
|
|
37
76
|
return new Promise((resolve, reject) => {
|
|
38
|
-
this.resolve(context,
|
|
77
|
+
this.resolve(context, what, (err, result) => {
|
|
39
78
|
if (err) {
|
|
40
|
-
console.error(err);
|
|
41
79
|
reject(err);
|
|
42
80
|
}
|
|
43
81
|
else if (result) {
|
|
44
|
-
|
|
82
|
+
const filePath = stripQueryAndHash(result);
|
|
83
|
+
if (path_1.default.isAbsolute(filePath)) {
|
|
84
|
+
this.addDependency(filePath);
|
|
85
|
+
}
|
|
45
86
|
resolve(result);
|
|
46
87
|
}
|
|
47
88
|
else {
|
|
48
|
-
reject(new Error(`Cannot resolve ${
|
|
89
|
+
reject(new Error(`Cannot resolve ${what}`));
|
|
49
90
|
}
|
|
50
91
|
});
|
|
51
92
|
});
|
|
52
|
-
};
|
|
93
|
+
});
|
|
53
94
|
const filename = path_1.default.basename(this.resourcePath, path_1.default.extname(this.resourcePath));
|
|
54
95
|
const transformServices = {
|
|
55
96
|
options: {
|
|
@@ -61,8 +102,10 @@ const webpackTransformLoader = function (content, inputSourceMap) {
|
|
|
61
102
|
},
|
|
62
103
|
cache,
|
|
63
104
|
};
|
|
64
|
-
(0, transform_1.transform)(transformServices, contentStr, asyncResolve)
|
|
65
|
-
|
|
105
|
+
(0, transform_1.transform)(transformServices, contentStr, asyncResolve)
|
|
106
|
+
.then(async (result) => {
|
|
107
|
+
var _a;
|
|
108
|
+
var _b, _c, _d;
|
|
66
109
|
if (result.cssText) {
|
|
67
110
|
const { cssText } = result;
|
|
68
111
|
await Promise.all((_b = (_a = result.dependencies) === null || _a === void 0 ? void 0 : _a.map((dep) => {
|
|
@@ -86,7 +129,9 @@ const webpackTransformLoader = function (content, inputSourceMap) {
|
|
|
86
129
|
return;
|
|
87
130
|
}
|
|
88
131
|
this.callback(null, result.code, (_d = result.sourceMap) !== null && _d !== void 0 ? _d : undefined);
|
|
89
|
-
}
|
|
132
|
+
})
|
|
133
|
+
.catch((err) => this.callback(err))
|
|
134
|
+
.finally(removeResolver);
|
|
90
135
|
};
|
|
91
136
|
exports.default = webpackTransformLoader;
|
|
92
137
|
//# sourceMappingURL=webpack-transform-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-transform-loader.js","sourceRoot":"","sources":["../../src/loaders/webpack-transform-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,0DAA6B;AAG7B,oDAA2E;
|
|
1
|
+
{"version":3,"file":"webpack-transform-loader.js","sourceRoot":"","sources":["../../src/loaders/webpack-transform-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,0DAA6B;AAG7B,oDAA2E;AAC3E,gDAAwB;AAGxB,oDAAuD;AACvD,0DAA+D;AAC/D,oDAAuD;AACvD,qCAA8E;AA0B9E,MAAM,KAAK,GAAG,IAAI,oCAAwB,EAAE,CAAC;AAQ7C,MAAM,SAAS,GAA+B,EAAE,CAAC;AAEjD,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,QAAQ,KAAK,CAAC,CAAC;QACjB,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC9D,IAAI,OAAO,KAAK,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,KAAe,EAAU,EAAE;IACnE,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAA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BAEa,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fast-check.js","sourceRoot":"","sources":["../../src/utils/fast-check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fast-check.js","sourceRoot":"","sources":["../../src/utils/fast-check.ts"],"names":[],"mappings":";;;AAAA,8CAA8D;AAC9D,qCAAkC;AAGlC,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAWlC,0BACE,OAAe,EACf,SAAS,GAAY,IAAI;IAGzB,IAAI,SAAS,IAAI,CAAC,qBAAqB,EAAE,CAAC;QACxC,eAAM,CAAC,IAAI,CACT,+FAA+F,CAChG,CAAC;QACF,eAAM,CAAC,IAAI,CACT,qFAAqF,CACtF,CAAC;QACF,qBAAqB,GAAG,IAAI,CAAC;IAC/B,CAAC;IAGD,MAAM,gBAAgB,GAAG,kCAAyB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,CAAC,SAAS,IAAI,gBAAgB,CAAC;IAEvD,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-import.js","sourceRoot":"","sources":["../../src/utils/insert-import.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"insert-import.js","sourceRoot":"","sources":["../../src/utils/insert-import.ts"],"names":[],"mappings":";;;AAMA,+BACE,OAAe,EACf,eAAuB;IAGvB,MAAM,WAAW,GACf,6EAA6E,CAAC;IAEhF,MAAM,aAAa,GAAG,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAGzD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC3D,MAAM,cAAc,GAAG,UAAU,CAAC,KAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAChE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,KAAK,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;IACnG,CAAC;IAGD,MAAM,cAAc,GAAG,sCAAsC,CAAC;IAC9D,MAAM,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAErD,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,eAAe,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACjD,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAE3C,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,SAAS,GAAG,eAAe,KAAK,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;IACjH,CAAC;IAGD,OAAO,GAAG,eAAe,KAAK,OAAO,EAAE,CAAC;AAC1C,CAAC"}
|
package/lib/utils/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;AAaA,MAAM,UAAU,GAA6B;IAC3C,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;IACjB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;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GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,GAAG,IAAe;QACtC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;YAAE,OAAO;QACpC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,GAAG,IAAe;QACvC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAAE,OAAO;QACrC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACxD,CAAC;IAGD,QAAQ,CAAC,OAAe,EAAE,KAAK,GAAwB,MAAM;QAC3D,IAAI,CAAC,IAAI,CAAC,YAAY;YAAE,OAAO,OAAO,CAAC;QACvC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;CACF;;AAGY,QAAA,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAGnC,sBAA6B,OAAsB;IACjD,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-map.js","sourceRoot":"","sources":["../../src/utils/source-map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-map.js","sourceRoot":"","sources":["../../src/utils/source-map.ts"],"names":[],"mappings":";;;AAQA,0BACE,KAAgC,EAChC,QAAgB;;IAIhB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;QACxC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,uCACK,KAAK,KACR,IAAI,QAAE,KAAK,CAAC,IAAI,mCAAI,QAAQ,EAC5B,QAAQ,QAAE,KAAK,CAAC,QAAQ,mCAAI,EAAE,EAC9B,KAAK,QAAE,KAAK,CAAC,KAAK,mCAAI,EAAE,EACxB,OAAO,QAAE,KAAK,CAAC,OAAO,mCAAI,EAAE,EAC5B,OAAO,QAAE,KAAK,CAAC,OAAO,mCAAI,CAAC,IAC3B;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-utils.js","sourceRoot":"","sources":["../../src/utils/webpack-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpack-utils.js","sourceRoot":"","sources":["../../src/utils/webpack-utils.ts"],"names":[],"mappings":";;;;;AAkCA,qBACE,IAAyB;IAEzB,OAAO,CACL,IAAI,CAAC,OAAO;QACZ,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;QAChC,IAAI,CAAC,OAAO,CAAC,OAAO;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,KAAK,UAAU,CACzD,CAAC;AACJ,CAAC;AAED,qBAA4B,IAAyB;IACnD,OAAO,QAAO,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAA,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAChF,CAAC;AAED,mBACE,KAAqC;IAErC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AAClE,CAAC"}
|
package/lib/with-linaria.d.ts
CHANGED
|
@@ -1,253 +1,3 @@
|
|
|
1
1
|
import type { WithLinariaConfig } from './types';
|
|
2
2
|
export type LinariaConfig = WithLinariaConfig;
|
|
3
|
-
export default function withLinaria(config: WithLinariaConfig):
|
|
4
|
-
allowedDevOrigins?: string[];
|
|
5
|
-
exportPathMap?: (defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
|
|
6
|
-
dev: boolean;
|
|
7
|
-
dir: string;
|
|
8
|
-
outDir: string | null;
|
|
9
|
-
distDir: string;
|
|
10
|
-
buildId: string;
|
|
11
|
-
}) => Promise<import("next/dist/server/config-shared").ExportPathMap> | import("next/dist/server/config-shared").ExportPathMap;
|
|
12
|
-
i18n?: import("next/dist/server/config-shared").I18NConfig | null;
|
|
13
|
-
typescript?: import("next/dist/server/config-shared").TypeScriptConfig;
|
|
14
|
-
typedRoutes?: boolean;
|
|
15
|
-
headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
|
|
16
|
-
rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
|
|
17
|
-
beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
18
|
-
afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
19
|
-
fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
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[];
|
|
26
|
-
excludeDefaultMomentLocales?: boolean;
|
|
27
|
-
webpack?: import("next/dist/server/config-shared").NextJsWebpackConfig | null;
|
|
28
|
-
trailingSlash?: boolean;
|
|
29
|
-
env?: Record<string, string | undefined>;
|
|
30
|
-
distDir?: string;
|
|
31
|
-
cleanDistDir?: boolean;
|
|
32
|
-
assetPrefix?: string;
|
|
33
|
-
cacheHandler?: string | undefined;
|
|
34
|
-
cacheHandlers?: {
|
|
35
|
-
default?: string;
|
|
36
|
-
remote?: string;
|
|
37
|
-
static?: string;
|
|
38
|
-
[handlerName: string]: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
cacheMaxMemorySize?: number;
|
|
41
|
-
useFileSystemPublicRoutes?: boolean;
|
|
42
|
-
generateBuildId?: () => string | null | Promise<string | null>;
|
|
43
|
-
generateEtags?: boolean;
|
|
44
|
-
pageExtensions?: string[];
|
|
45
|
-
compress?: boolean;
|
|
46
|
-
poweredByHeader?: boolean;
|
|
47
|
-
images?: import("next/dist/shared/lib/image-config").ImageConfig;
|
|
48
|
-
devIndicators?: false | {
|
|
49
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
50
|
-
};
|
|
51
|
-
onDemandEntries?: {
|
|
52
|
-
maxInactiveAge?: number;
|
|
53
|
-
pagesBufferLength?: number;
|
|
54
|
-
};
|
|
55
|
-
deploymentId?: string;
|
|
56
|
-
basePath?: string;
|
|
57
|
-
sassOptions?: {
|
|
58
|
-
implementation?: string;
|
|
59
|
-
[key: string]: any;
|
|
60
|
-
};
|
|
61
|
-
productionBrowserSourceMaps?: boolean;
|
|
62
|
-
reactCompiler?: boolean | import("next/dist/server/config-shared").ReactCompilerOptions;
|
|
63
|
-
reactProductionProfiling?: boolean;
|
|
64
|
-
reactStrictMode?: boolean | null;
|
|
65
|
-
reactMaxHeadersLength?: number;
|
|
66
|
-
httpAgentOptions?: {
|
|
67
|
-
keepAlive?: boolean;
|
|
68
|
-
};
|
|
69
|
-
staticPageGenerationTimeout?: number;
|
|
70
|
-
crossOrigin?: "anonymous" | "use-credentials";
|
|
71
|
-
compiler?: {
|
|
72
|
-
reactRemoveProperties?: boolean | {
|
|
73
|
-
properties?: string[];
|
|
74
|
-
};
|
|
75
|
-
relay?: {
|
|
76
|
-
src: string;
|
|
77
|
-
artifactDirectory?: string;
|
|
78
|
-
language?: "typescript" | "javascript" | "flow";
|
|
79
|
-
eagerEsModules?: boolean;
|
|
80
|
-
};
|
|
81
|
-
removeConsole?: boolean | {
|
|
82
|
-
exclude?: string[];
|
|
83
|
-
};
|
|
84
|
-
styledComponents?: boolean | import("next/dist/server/config-shared").StyledComponentsConfig;
|
|
85
|
-
emotion?: boolean | import("next/dist/server/config-shared").EmotionConfig;
|
|
86
|
-
styledJsx?: boolean | {
|
|
87
|
-
useLightningcss?: boolean;
|
|
88
|
-
};
|
|
89
|
-
define?: Record<string, string>;
|
|
90
|
-
defineServer?: Record<string, string>;
|
|
91
|
-
runAfterProductionCompile?: (metadata: {
|
|
92
|
-
projectDir: string;
|
|
93
|
-
distDir: string;
|
|
94
|
-
}) => Promise<void>;
|
|
95
|
-
};
|
|
96
|
-
output?: "standalone" | "export";
|
|
97
|
-
transpilePackages?: string[];
|
|
98
|
-
turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
|
|
99
|
-
skipMiddlewareUrlNormalize?: boolean;
|
|
100
|
-
skipProxyUrlNormalize?: boolean;
|
|
101
|
-
skipTrailingSlashRedirect?: boolean;
|
|
102
|
-
modularizeImports?: Record<string, {
|
|
103
|
-
transform: string | Record<string, string>;
|
|
104
|
-
preventFullImport?: boolean;
|
|
105
|
-
skipDefaultConversion?: boolean;
|
|
106
|
-
}>;
|
|
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
|
-
};
|
|
117
|
-
expireTime?: number;
|
|
118
|
-
experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
|
|
119
|
-
bundlePagesRouterDependencies?: boolean;
|
|
120
|
-
serverExternalPackages?: string[];
|
|
121
|
-
outputFileTracingRoot?: string;
|
|
122
|
-
outputFileTracingExcludes?: Record<string, string[]>;
|
|
123
|
-
outputFileTracingIncludes?: Record<string, string[]>;
|
|
124
|
-
watchOptions?: {
|
|
125
|
-
pollIntervalMs?: number;
|
|
126
|
-
};
|
|
127
|
-
htmlLimitedBots?: RegExp;
|
|
128
|
-
} | {
|
|
129
|
-
webpack: (config: import("webpack").Configuration, options: import("next/dist/server/config-shared").WebpackConfigContext) => any;
|
|
130
|
-
allowedDevOrigins?: string[];
|
|
131
|
-
exportPathMap?: (defaultMap: import("next/dist/server/config-shared").ExportPathMap, ctx: {
|
|
132
|
-
dev: boolean;
|
|
133
|
-
dir: string;
|
|
134
|
-
outDir: string | null;
|
|
135
|
-
distDir: string;
|
|
136
|
-
buildId: string;
|
|
137
|
-
}) => Promise<import("next/dist/server/config-shared").ExportPathMap> | import("next/dist/server/config-shared").ExportPathMap;
|
|
138
|
-
i18n?: import("next/dist/server/config-shared").I18NConfig | null;
|
|
139
|
-
typescript?: import("next/dist/server/config-shared").TypeScriptConfig;
|
|
140
|
-
typedRoutes?: boolean;
|
|
141
|
-
headers?: () => Promise<import("next/dist/lib/load-custom-routes").Header[]> | import("next/dist/lib/load-custom-routes").Header[];
|
|
142
|
-
rewrites?: () => Promise<import("next/dist/lib/load-custom-routes").Rewrite[] | {
|
|
143
|
-
beforeFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
144
|
-
afterFiles?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
145
|
-
fallback?: import("next/dist/lib/load-custom-routes").Rewrite[];
|
|
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[];
|
|
152
|
-
excludeDefaultMomentLocales?: boolean;
|
|
153
|
-
trailingSlash?: boolean;
|
|
154
|
-
env?: Record<string, string | undefined>;
|
|
155
|
-
distDir?: string;
|
|
156
|
-
cleanDistDir?: boolean;
|
|
157
|
-
assetPrefix?: string;
|
|
158
|
-
cacheHandler?: string | undefined;
|
|
159
|
-
cacheHandlers?: {
|
|
160
|
-
default?: string;
|
|
161
|
-
remote?: string;
|
|
162
|
-
static?: string;
|
|
163
|
-
[handlerName: string]: string | undefined;
|
|
164
|
-
};
|
|
165
|
-
cacheMaxMemorySize?: number;
|
|
166
|
-
useFileSystemPublicRoutes?: boolean;
|
|
167
|
-
generateBuildId?: () => string | null | Promise<string | null>;
|
|
168
|
-
generateEtags?: boolean;
|
|
169
|
-
pageExtensions?: string[];
|
|
170
|
-
compress?: boolean;
|
|
171
|
-
poweredByHeader?: boolean;
|
|
172
|
-
images?: import("next/dist/shared/lib/image-config").ImageConfig;
|
|
173
|
-
devIndicators?: false | {
|
|
174
|
-
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
175
|
-
};
|
|
176
|
-
onDemandEntries?: {
|
|
177
|
-
maxInactiveAge?: number;
|
|
178
|
-
pagesBufferLength?: number;
|
|
179
|
-
};
|
|
180
|
-
deploymentId?: string;
|
|
181
|
-
basePath?: string;
|
|
182
|
-
sassOptions?: {
|
|
183
|
-
implementation?: string;
|
|
184
|
-
[key: string]: any;
|
|
185
|
-
};
|
|
186
|
-
productionBrowserSourceMaps?: boolean;
|
|
187
|
-
reactCompiler?: boolean | import("next/dist/server/config-shared").ReactCompilerOptions;
|
|
188
|
-
reactProductionProfiling?: boolean;
|
|
189
|
-
reactStrictMode?: boolean | null;
|
|
190
|
-
reactMaxHeadersLength?: number;
|
|
191
|
-
httpAgentOptions?: {
|
|
192
|
-
keepAlive?: boolean;
|
|
193
|
-
};
|
|
194
|
-
staticPageGenerationTimeout?: number;
|
|
195
|
-
crossOrigin?: "anonymous" | "use-credentials";
|
|
196
|
-
compiler?: {
|
|
197
|
-
reactRemoveProperties?: boolean | {
|
|
198
|
-
properties?: string[];
|
|
199
|
-
};
|
|
200
|
-
relay?: {
|
|
201
|
-
src: string;
|
|
202
|
-
artifactDirectory?: string;
|
|
203
|
-
language?: "typescript" | "javascript" | "flow";
|
|
204
|
-
eagerEsModules?: boolean;
|
|
205
|
-
};
|
|
206
|
-
removeConsole?: boolean | {
|
|
207
|
-
exclude?: string[];
|
|
208
|
-
};
|
|
209
|
-
styledComponents?: boolean | import("next/dist/server/config-shared").StyledComponentsConfig;
|
|
210
|
-
emotion?: boolean | import("next/dist/server/config-shared").EmotionConfig;
|
|
211
|
-
styledJsx?: boolean | {
|
|
212
|
-
useLightningcss?: boolean;
|
|
213
|
-
};
|
|
214
|
-
define?: Record<string, string>;
|
|
215
|
-
defineServer?: Record<string, string>;
|
|
216
|
-
runAfterProductionCompile?: (metadata: {
|
|
217
|
-
projectDir: string;
|
|
218
|
-
distDir: string;
|
|
219
|
-
}) => Promise<void>;
|
|
220
|
-
};
|
|
221
|
-
output?: "standalone" | "export";
|
|
222
|
-
transpilePackages?: string[];
|
|
223
|
-
turbopack?: import("next/dist/server/config-shared").TurbopackOptions;
|
|
224
|
-
skipMiddlewareUrlNormalize?: boolean;
|
|
225
|
-
skipProxyUrlNormalize?: boolean;
|
|
226
|
-
skipTrailingSlashRedirect?: boolean;
|
|
227
|
-
modularizeImports?: Record<string, {
|
|
228
|
-
transform: string | Record<string, string>;
|
|
229
|
-
preventFullImport?: boolean;
|
|
230
|
-
skipDefaultConversion?: boolean;
|
|
231
|
-
}>;
|
|
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
|
-
};
|
|
242
|
-
expireTime?: number;
|
|
243
|
-
experimental?: import("next/dist/server/config-shared").ExperimentalConfig;
|
|
244
|
-
bundlePagesRouterDependencies?: boolean;
|
|
245
|
-
serverExternalPackages?: string[];
|
|
246
|
-
outputFileTracingRoot?: string;
|
|
247
|
-
outputFileTracingExcludes?: Record<string, string[]>;
|
|
248
|
-
outputFileTracingIncludes?: Record<string, string[]>;
|
|
249
|
-
watchOptions?: {
|
|
250
|
-
pollIntervalMs?: number;
|
|
251
|
-
};
|
|
252
|
-
htmlLimitedBots?: RegExp;
|
|
253
|
-
};
|
|
3
|
+
export default function withLinaria(config: WithLinariaConfig): WithLinariaConfig;
|
package/lib/with-linaria.js
CHANGED
|
@@ -4,13 +4,10 @@ exports.default = withLinaria;
|
|
|
4
4
|
const add_turbopack_config_1 = require("./add-turbopack-config");
|
|
5
5
|
const add_webpack_config_1 = require("./add-webpack-config");
|
|
6
6
|
function withLinaria(config) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
else {
|
|
12
|
-
return (0, add_webpack_config_1.addWebpackConfig)(config);
|
|
13
|
-
}
|
|
7
|
+
let configWithLinaria = config;
|
|
8
|
+
configWithLinaria = (0, add_turbopack_config_1.addTurbopackConfig)(configWithLinaria);
|
|
9
|
+
configWithLinaria = (0, add_webpack_config_1.addWebpackConfig)(configWithLinaria);
|
|
10
|
+
return configWithLinaria;
|
|
14
11
|
}
|
|
15
12
|
module.exports = withLinaria;
|
|
16
13
|
//# sourceMappingURL=with-linaria.js.map
|
package/lib/with-linaria.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-linaria.js","sourceRoot":"","sources":["../src/with-linaria.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-linaria.js","sourceRoot":"","sources":["../src/with-linaria.ts"],"names":[],"mappings":";;;AAAA,iEAA4D;AAC5D,6DAAwD;AAKxD,qBAAoC,MAAyB;IAC3D,IAAI,iBAAiB,GAAG,MAAM,CAAC;IAE/B,iBAAiB,GAAG,IAAA,yCAAkB,EAAC,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,GAAG,IAAA,qCAAgB,EAAC,iBAAiB,CAAC,CAAC;IAExD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,43 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-with-linaria",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Linaria support for Next.js App Router",
|
|
5
5
|
"main": "lib/with-linaria.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc",
|
|
8
8
|
"watch": "tsc -w",
|
|
9
9
|
"clean": "rm -rf lib",
|
|
10
|
-
"lint": "
|
|
11
|
-
"
|
|
10
|
+
"lint": "oxlint",
|
|
11
|
+
"lint:fix": "oxlint --fix",
|
|
12
|
+
"fmt": "oxfmt",
|
|
13
|
+
"fmt:check": "oxfmt --check",
|
|
14
|
+
"test": "pnpm --filter ./tests/example run test",
|
|
12
15
|
"prepublish": "pnpm run clean && pnpm run build"
|
|
13
16
|
},
|
|
14
|
-
"packageManager": "pnpm@
|
|
17
|
+
"packageManager": "pnpm@10.33.0",
|
|
15
18
|
"devDependencies": {
|
|
16
|
-
"@rspack/core": "1.
|
|
19
|
+
"@rspack/core": "2.1.10",
|
|
17
20
|
"@types/fs-extra": "11.0.4",
|
|
18
|
-
"@
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
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
|
-
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
26
|
-
"eslint-plugin-typescript-sort-keys": "3.3.0",
|
|
27
|
-
"eslint-plugin-unused-imports": "4.2.0",
|
|
28
|
-
"globals": "16.4.0",
|
|
21
|
+
"@wyw-in-js/babel-preset": "2.4.2",
|
|
22
|
+
"@wyw-in-js/transform": "2.4.2",
|
|
23
|
+
"globals": "17.11.0",
|
|
29
24
|
"is-ci": "4.1.0",
|
|
30
|
-
"lint-staged": "
|
|
31
|
-
"next": "16.
|
|
32
|
-
"
|
|
25
|
+
"lint-staged": "17.3.0",
|
|
26
|
+
"next": "16.3.2",
|
|
27
|
+
"oxfmt": "0.64.0",
|
|
28
|
+
"oxlint": "1.79.0",
|
|
33
29
|
"simple-git-hooks": "2.13.1",
|
|
34
|
-
"typescript": "
|
|
35
|
-
"webpack": "5.
|
|
30
|
+
"typescript": "7.0.2",
|
|
31
|
+
"webpack": "5.109.2"
|
|
36
32
|
},
|
|
37
33
|
"peerDependencies": {
|
|
38
34
|
"@babel/runtime": "7.x",
|
|
39
|
-
"@wyw-in-js/babel-preset": "
|
|
40
|
-
"@wyw-in-js/transform": "
|
|
35
|
+
"@wyw-in-js/babel-preset": "2.x",
|
|
36
|
+
"@wyw-in-js/transform": "2.x"
|
|
41
37
|
},
|
|
42
38
|
"files": [
|
|
43
39
|
"lib"
|
|
@@ -47,10 +43,10 @@
|
|
|
47
43
|
},
|
|
48
44
|
"lint-staged": {
|
|
49
45
|
"**/*.(js|jsx|ts|tsx)": [
|
|
50
|
-
"
|
|
46
|
+
"oxlint --fix"
|
|
51
47
|
],
|
|
52
48
|
"**/*.(js|jsx|ts|tsx|json|css|md|mdx)": [
|
|
53
|
-
"
|
|
49
|
+
"oxfmt"
|
|
54
50
|
]
|
|
55
51
|
},
|
|
56
52
|
"author": "Dario Lehmhus",
|