next-with-linaria 1.1.0 → 1.2.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.
|
@@ -88,6 +88,11 @@ export declare function addTurbopackConfig({ linaria: linariaOptions, ...config
|
|
|
88
88
|
useLightningcss?: boolean;
|
|
89
89
|
};
|
|
90
90
|
define?: Record<string, string>;
|
|
91
|
+
defineServer?: Record<string, string>;
|
|
92
|
+
runAfterProductionCompile?: (metadata: {
|
|
93
|
+
projectDir: string;
|
|
94
|
+
distDir: string;
|
|
95
|
+
}) => Promise<void>;
|
|
91
96
|
};
|
|
92
97
|
output?: "standalone" | "export";
|
|
93
98
|
transpilePackages?: string[];
|
|
@@ -17,21 +17,25 @@ 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;
|
|
21
|
-
var
|
|
20
|
+
var _b, _c, _d;
|
|
21
|
+
var _e, _f;
|
|
22
22
|
var { linaria: linariaOptions } = _a, config = __rest(_a, ["linaria"]);
|
|
23
23
|
(_b = config.turbopack) !== null && _b !== void 0 ? _b : (config.turbopack = {});
|
|
24
|
-
(_c = (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
(_c = (_e = config.turbopack).rules) !== null && _c !== void 0 ? _c : (_e.rules = {});
|
|
25
|
+
const linariaLoader = {
|
|
26
|
+
loader: path_1.default.resolve(__dirname, './loaders/turbopack-transform-loader'),
|
|
27
|
+
options: Object.assign(Object.assign({ sourceMap: process.env.NODE_ENV !== 'production', displayName: process.env.NODE_ENV !== 'production' }, linariaOptions), { babelOptions: {
|
|
28
|
+
presets: ['next/babel', '@wyw-in-js'],
|
|
29
|
+
} }),
|
|
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] = {
|
|
37
|
+
loaders: [linariaLoader],
|
|
38
|
+
};
|
|
35
39
|
return config;
|
|
36
40
|
}
|
|
37
41
|
//# sourceMappingURL=add-turbopack-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-turbopack-config.js","sourceRoot":"","sources":["../src/add-turbopack-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA,
|
|
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;IAgBF,MAAM,WAAW,GAAG,iBAAiB,CAAC;IAGtC,YAAA,MAAM,CAAC,SAAS,EAAC,UAAU,uCAAV,UAAU,GAAK,EAAE,EAAC;IAEnC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG;QACzC,IAAI,EAAE,iDAAiD;KACxD,CAAC;IAIF,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG;QACpC,OAAO,EAAE,CAAC,aAAa,CAAC;KACzB,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -96,6 +96,11 @@ export declare function addWebpackConfig({ linaria, ...nextConfig }: LinariaConf
|
|
|
96
96
|
useLightningcss?: boolean;
|
|
97
97
|
};
|
|
98
98
|
define?: Record<string, string>;
|
|
99
|
+
defineServer?: Record<string, string>;
|
|
100
|
+
runAfterProductionCompile?: (metadata: {
|
|
101
|
+
projectDir: string;
|
|
102
|
+
distDir: string;
|
|
103
|
+
}) => Promise<void>;
|
|
99
104
|
};
|
|
100
105
|
output?: "standalone" | "export";
|
|
101
106
|
transpilePackages?: string[];
|
package/lib/with-linaria.d.ts
CHANGED
|
@@ -89,6 +89,11 @@ export default function withLinaria(config: WithLinariaConfig): {
|
|
|
89
89
|
useLightningcss?: boolean;
|
|
90
90
|
};
|
|
91
91
|
define?: Record<string, string>;
|
|
92
|
+
defineServer?: Record<string, string>;
|
|
93
|
+
runAfterProductionCompile?: (metadata: {
|
|
94
|
+
projectDir: string;
|
|
95
|
+
distDir: string;
|
|
96
|
+
}) => Promise<void>;
|
|
92
97
|
};
|
|
93
98
|
output?: "standalone" | "export";
|
|
94
99
|
transpilePackages?: string[];
|
|
@@ -200,6 +205,11 @@ export default function withLinaria(config: WithLinariaConfig): {
|
|
|
200
205
|
useLightningcss?: boolean;
|
|
201
206
|
};
|
|
202
207
|
define?: Record<string, string>;
|
|
208
|
+
defineServer?: Record<string, string>;
|
|
209
|
+
runAfterProductionCompile?: (metadata: {
|
|
210
|
+
projectDir: string;
|
|
211
|
+
distDir: string;
|
|
212
|
+
}) => Promise<void>;
|
|
203
213
|
};
|
|
204
214
|
output?: "standalone" | "export";
|
|
205
215
|
transpilePackages?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-with-linaria",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Linaria support for Next.js App Router",
|
|
5
5
|
"main": "lib/with-linaria.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"eslint-plugin-unused-imports": "4.1.4",
|
|
28
28
|
"is-ci": "4.1.0",
|
|
29
29
|
"lint-staged": "15.5.0",
|
|
30
|
-
"next": "15.4.0-canary.
|
|
30
|
+
"next": "15.4.0-canary.81",
|
|
31
31
|
"prettier": "3.5.3",
|
|
32
32
|
"simple-git-hooks": "2.12.1",
|
|
33
33
|
"typescript": "5.8.2",
|