@nx/rollup 22.7.0-beta.11 → 22.7.0-beta.13
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/rollup",
|
|
3
|
-
"version": "22.7.0-beta.
|
|
3
|
+
"version": "22.7.0-beta.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.",
|
|
6
6
|
"repository": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"migrations": "./migrations.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nx/devkit": "22.7.0-beta.
|
|
34
|
-
"@nx/js": "22.7.0-beta.
|
|
33
|
+
"@nx/devkit": "22.7.0-beta.13",
|
|
34
|
+
"@nx/js": "22.7.0-beta.13",
|
|
35
35
|
"@rollup/plugin-babel": "^6.0.4",
|
|
36
36
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
37
37
|
"@rollup/plugin-image": "^3.0.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"tslib": "^2.3.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"nx": "22.7.0-beta.
|
|
52
|
+
"nx": "22.7.0-beta.13",
|
|
53
53
|
"source-map-js": "^1.2.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-nx.d.ts","sourceRoot":"","sources":["../../../../../../packages/rollup/src/plugins/with-nx/with-nx.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,6BAA6B,EAC9B,MAAM,uCAAuC,CAAC;AAY/C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAQjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AA4B9D,wBAAgB,MAAM,CACpB,UAAU,EAAE,yBAAyB,EACrC,YAAY,GAAE,MAAM,CAAC,aAAkB,EAEvC,YAAY,CAAC,EAAE,6BAA6B,EAAE,GAC7C,MAAM,CAAC,aAAa,CA0RtB"}
|
|
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.withNx = withNx;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const path_1 = require("path");
|
|
6
7
|
const type_definitions_1 = require("@nx/js/src/plugins/rollup/type-definitions");
|
|
7
8
|
const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
|
|
8
9
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
10
|
+
const ts_config_1 = require("@nx/js/src/utils/typescript/ts-config");
|
|
9
11
|
const plugin_babel_1 = require("@rollup/plugin-babel");
|
|
10
12
|
const plugin_node_resolve_1 = tslib_1.__importDefault(require("@rollup/plugin-node-resolve"));
|
|
11
13
|
const autoprefixer_1 = tslib_1.__importDefault(require("autoprefixer"));
|
|
@@ -151,7 +153,8 @@ dependencies) {
|
|
|
151
153
|
else {
|
|
152
154
|
options.generatePackageJson ??= true;
|
|
153
155
|
}
|
|
154
|
-
const
|
|
156
|
+
const originalTsConfigPath = (0, node_path_1.join)(devkit_1.workspaceRoot, options.tsConfig);
|
|
157
|
+
const compilerOptions = createTsCompilerOptions(projectRoot, tsConfig, originalTsConfigPath, options, dependencies);
|
|
155
158
|
compilerOptions.outDir = Array.isArray(finalConfig.output)
|
|
156
159
|
? finalConfig.output[0].dir
|
|
157
160
|
: finalConfig.output.dir;
|
|
@@ -264,8 +267,20 @@ function createInput(options) {
|
|
|
264
267
|
});
|
|
265
268
|
return input;
|
|
266
269
|
}
|
|
267
|
-
function createTsCompilerOptions(projectRoot, config, options, dependencies) {
|
|
270
|
+
function createTsCompilerOptions(projectRoot, config, tsConfigPath, options, dependencies) {
|
|
268
271
|
const compilerOptionPaths = (0, buildable_libs_utils_1.computeCompilerOptionsPaths)(config, dependencies ?? []);
|
|
272
|
+
// Resolve paths to absolute so they work without baseUrl and regardless
|
|
273
|
+
// of which tsconfig the plugin reads (project vs workspace root).
|
|
274
|
+
const pathsBase = (0, ts_config_1.resolvePathsBaseUrl)(tsConfigPath);
|
|
275
|
+
for (const key of Object.keys(compilerOptionPaths)) {
|
|
276
|
+
compilerOptionPaths[key] = compilerOptionPaths[key].map((p) => {
|
|
277
|
+
if ((0, path_1.isAbsolute)(p)) {
|
|
278
|
+
return p;
|
|
279
|
+
}
|
|
280
|
+
const stripped = p.startsWith('./') ? p.slice(2) : p;
|
|
281
|
+
return (0, path_1.resolve)(pathsBase, stripped).replace(/\\/g, '/');
|
|
282
|
+
});
|
|
283
|
+
}
|
|
269
284
|
const compilerOptions = {
|
|
270
285
|
rootDir: projectRoot,
|
|
271
286
|
allowJs: options.allowJs,
|