@nx/rollup 0.0.0-pr-30457-2f25946 → 0.0.0-pr-3-49a51e7

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": "0.0.0-pr-30457-2f25946",
3
+ "version": "0.0.0-pr-3-49a51e7",
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": {
@@ -29,8 +29,8 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@nx/devkit": "0.0.0-pr-30457-2f25946",
33
- "@nx/js": "0.0.0-pr-30457-2f25946",
32
+ "@nx/devkit": "0.0.0-pr-3-49a51e7",
33
+ "@nx/js": "0.0.0-pr-3-49a51e7",
34
34
  "@rollup/plugin-babel": "^6.0.4",
35
35
  "@rollup/plugin-commonjs": "^25.0.7",
36
36
  "@rollup/plugin-image": "^3.0.3",
@@ -15,23 +15,22 @@ export interface Globals {
15
15
  export interface RollupExecutorOptions {
16
16
  outputPath: string;
17
17
  tsConfig: string;
18
- main: string;
19
- additionalEntryPoints?: string[];
20
18
  allowJs?: boolean;
19
+ project: string;
20
+ main: string;
21
+ outputFileName?: string;
22
+ extractCss?: boolean | string;
23
+ external?: string[] | 'all' | 'none';
24
+ rollupConfig?: string | string[];
25
+ watch?: boolean;
21
26
  assets?: any[];
22
- babelUpwardRootMode?: boolean;
23
- buildLibsFromSource?: boolean;
24
- compiler?: 'babel' | 'tsc' | 'swc';
25
27
  deleteOutputPath?: boolean;
26
- external?: string[] | 'all' | 'none';
27
- extractCss?: boolean | string;
28
28
  format?: ('cjs' | 'esm')[];
29
- generateExportsField?: boolean;
29
+ compiler?: 'babel' | 'tsc' | 'swc';
30
30
  javascriptEnabled?: boolean;
31
- project?: string;
32
- outputFileName?: string;
33
- rollupConfig?: string | string[];
31
+ generateExportsField?: boolean;
32
+ additionalEntryPoints?: string[];
34
33
  skipTypeCheck?: boolean;
34
+ babelUpwardRootMode?: boolean;
35
35
  skipTypeField?: boolean;
36
- watch?: boolean;
37
36
  }
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "version": 2,
3
3
  "outputCapture": "direct-nodejs",
4
- "title": "Web Library Rollup Target",
4
+ "title": "Web Library Rollup Target (Experimental)",
5
5
  "description": "Packages a library for different web usages (ESM, CommonJS).",
6
6
  "cli": "nx",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "project": {
10
10
  "type": "string",
11
- "description": "The path to package.json file."
11
+ "description": "The path to package.json file.",
12
+ "x-priority": "important"
12
13
  },
13
14
  "main": {
14
15
  "type": "string",
@@ -137,11 +138,6 @@
137
138
  },
138
139
  "x-priority": "important"
139
140
  },
140
- "buildLibsFromSource": {
141
- "type": "boolean",
142
- "description": "Read buildable libraries from source instead of building them separately.",
143
- "default": true
144
- },
145
141
  "skipTypeCheck": {
146
142
  "type": "boolean",
147
143
  "description": "Whether to skip TypeScript type checking.",
@@ -122,8 +122,6 @@ function updatePackageJson(tree, options, outputConfig, isTsSolutionSetup) {
122
122
  : undefined) ?? nxJson.targetDefaults?.[options.buildTarget]);
123
123
  ({ main, outputPath } = mergedTarget.options);
124
124
  }
125
- // the file must exist in the TS solution setup
126
- const tsconfigBase = (0, devkit_1.readJson)(tree, 'tsconfig.base.json');
127
125
  packageJson = (0, js_1.getUpdatedPackageJsonContent)(packageJson, {
128
126
  main,
129
127
  outputPath,
@@ -134,7 +132,6 @@ function updatePackageJson(tree, options, outputConfig, isTsSolutionSetup) {
134
132
  format: options.format ?? ['esm'],
135
133
  outputFileExtensionForCjs: '.cjs.js',
136
134
  outputFileExtensionForEsm: '.esm.js',
137
- skipDevelopmentExports: !tsconfigBase.compilerOptions?.customConditions?.includes('development'),
138
135
  });
139
136
  // rollup has a specific declaration file generation not handled by the util above,
140
137
  // adjust accordingly
@@ -15,10 +15,6 @@ export interface RollupWithNxPluginOptions {
15
15
  * Whether to set rootmode to upward. See https://babeljs.io/docs/en/options#rootmode
16
16
  */
17
17
  babelUpwardRootMode?: boolean;
18
- /**
19
- * Build the libraries from source. Default is `true`.
20
- */
21
- buildLibsFromSource?: boolean;
22
18
  /**
23
19
  * Which compiler to use.
24
20
  */
@@ -43,9 +43,7 @@ dependencies) {
43
43
  const options = (0, normalize_options_1.normalizeOptions)(projectNode.data.root, projectNode.data.sourceRoot, rawOptions);
44
44
  const useBabel = options.compiler === 'babel';
45
45
  const useSwc = options.compiler === 'swc';
46
- const tsConfigPath = options.buildLibsFromSource || global.NX_GRAPH_CREATION
47
- ? (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, options.tsConfig)
48
- : (0, buildable_libs_utils_1.createTmpTsConfig)(options.tsConfig, devkit_1.workspaceRoot, projectRoot, dependencies);
46
+ const tsConfigPath = (0, devkit_1.joinPathFragments)(devkit_1.workspaceRoot, options.tsConfig);
49
47
  const tsConfigFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile);
50
48
  const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, (0, node_path_1.dirname)(tsConfigPath));
51
49
  if (!options.format || !options.format.length) {
@@ -143,7 +141,7 @@ dependencies) {
143
141
  // Needed to generate type definitions, even if we're using babel or swc.
144
142
  require('rollup-plugin-typescript2')({
145
143
  check: !options.skipTypeCheck,
146
- tsconfig: tsConfigPath,
144
+ tsconfig: options.tsConfig,
147
145
  tsconfigOverride: {
148
146
  compilerOptions: createTsCompilerOptions(projectRoot, tsConfig, options, dependencies),
149
147
  },