@nx/angular-rspack-compiler 22.4.0-canary.20260119-6bb82c0 → 22.4.0-canary.20260120-e586896
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-compilation.d.ts","sourceRoot":"","sources":["../../src/compilation/setup-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE5E,OAAO,
|
|
1
|
+
{"version":3,"file":"setup-compilation.d.ts","sourceRoot":"","sources":["../../src/compilation/setup-compilation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AAE5E,OAAO,EACL,0BAA0B,EAI3B,MAAM,wBAAwB,CAAC;AAKhC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,gBAAgB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACzC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAAC,eAc5C,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,EAC9C,OAAO,EAAE,uBAAuB;;;;GAuEjC;AAED,wBAAgB,cAAc,CAC5B,0BAA0B,EAAE,0BAA0B,IAGpD,QAAQ,MAAM,EACd,gBAAgB,MAAM,EACtB,iBAAiB,MAAM,KACtB,OAAO,CAAC,yBAAyB,CAAC,CAmCtC"}
|
|
@@ -7,6 +7,7 @@ const utils_1 = require("../utils");
|
|
|
7
7
|
const private_1 = require("@angular/build/private");
|
|
8
8
|
const targets_from_browsers_1 = require("../utils/targets-from-browsers");
|
|
9
9
|
const private_2 = require("@angular/build/private");
|
|
10
|
+
const node_module_1 = require("node:module");
|
|
10
11
|
exports.DEFAULT_NG_COMPILER_OPTIONS = {
|
|
11
12
|
suppressOutputPathCheck: true,
|
|
12
13
|
outDir: undefined,
|
|
@@ -35,6 +36,25 @@ async function setupCompilation(config, options) {
|
|
|
35
36
|
: {}),
|
|
36
37
|
});
|
|
37
38
|
const compilerOptions = tsCompilerOptions;
|
|
39
|
+
const searchDirectories = await (0, private_1.generateSearchDirectories)([options.root]);
|
|
40
|
+
const postcssConfiguration = await (0, private_1.loadPostcssConfiguration)(searchDirectories);
|
|
41
|
+
// Skip tailwind configuration if postcss is customized
|
|
42
|
+
let tailwindConfiguration;
|
|
43
|
+
if (!postcssConfiguration) {
|
|
44
|
+
const tailwindConfigPath = (0, private_1.findTailwindConfiguration)(searchDirectories);
|
|
45
|
+
if (tailwindConfigPath) {
|
|
46
|
+
const resolver = (0, node_module_1.createRequire)(tailwindConfigPath);
|
|
47
|
+
try {
|
|
48
|
+
tailwindConfiguration = {
|
|
49
|
+
file: tailwindConfigPath,
|
|
50
|
+
package: resolver.resolve('tailwindcss'),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
// Tailwind config found but package not installed - warning already shown by Angular build
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
38
58
|
const componentStylesheetBundler = new private_1.ComponentStylesheetBundler({
|
|
39
59
|
workspaceRoot: options.root,
|
|
40
60
|
optimization: config.mode === 'production',
|
|
@@ -50,6 +70,8 @@ async function setupCompilation(config, options) {
|
|
|
50
70
|
})),
|
|
51
71
|
includePaths: options.includePaths,
|
|
52
72
|
sass: options.sass,
|
|
73
|
+
postcssConfiguration,
|
|
74
|
+
tailwindConfiguration,
|
|
53
75
|
}, options.inlineStyleLanguage, false);
|
|
54
76
|
return {
|
|
55
77
|
rootNames,
|