@nx/rollup 19.0.0-beta.0 → 19.0.0-beta.1

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/migrations.json CHANGED
@@ -34,6 +34,19 @@
34
34
  "alwaysAddToPackageJson": false
35
35
  }
36
36
  }
37
+ },
38
+ "19.0.0": {
39
+ "version": "19.0.0-beta.0",
40
+ "packages": {
41
+ "@rollup/plugin-url": {
42
+ "version": "^8.0.2",
43
+ "alwaysAddToPackageJson": false
44
+ },
45
+ "@svgr/rollup": {
46
+ "version": "^8.1.0",
47
+ "alwaysAddToPackageJson": false
48
+ }
49
+ }
37
50
  }
38
51
  }
39
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/rollup",
3
- "version": "19.0.0-beta.0",
3
+ "version": "19.0.0-beta.1",
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,24 +29,23 @@
29
29
  "migrations": "./migrations.json"
30
30
  },
31
31
  "dependencies": {
32
- "@rollup/plugin-babel": "^5.3.0",
33
- "@rollup/plugin-commonjs": "^20.0.0",
34
- "@rollup/plugin-image": "^2.1.0",
35
- "@rollup/plugin-json": "^4.1.0",
36
- "@rollup/plugin-node-resolve": "^13.0.4",
32
+ "@rollup/plugin-babel": "^6.0.4",
33
+ "@rollup/plugin-commonjs": "^25.0.7",
34
+ "@rollup/plugin-image": "^3.0.3",
35
+ "@rollup/plugin-json": "^6.1.0",
36
+ "@rollup/plugin-node-resolve": "^15.2.3",
37
37
  "autoprefixer": "^10.4.9",
38
38
  "babel-plugin-transform-async-to-promises": "^0.8.15",
39
39
  "chalk": "^4.1.0",
40
40
  "postcss": "^8.4.14",
41
- "rollup": "^2.56.2",
42
- "rollup-plugin-copy": "^3.4.0",
43
- "rollup-plugin-peer-deps-external": "^2.2.4",
44
- "rollup-plugin-postcss": "^4.0.1",
45
- "rollup-plugin-typescript2": "0.36.0",
41
+ "rollup": "^4.14.0",
42
+ "rollup-plugin-copy": "^3.5.0",
43
+ "rollup-plugin-postcss": "^4.0.2",
44
+ "rollup-plugin-typescript2": "^0.36.0",
46
45
  "tslib": "^2.3.0",
47
- "@nx/devkit": "19.0.0-beta.0",
48
- "@nx/js": "19.0.0-beta.0",
49
- "@nrwl/rollup": "19.0.0-beta.0"
46
+ "@nx/devkit": "19.0.0-beta.1",
47
+ "@nx/js": "19.0.0-beta.1",
48
+ "@nrwl/rollup": "19.0.0-beta.1"
50
49
  },
51
50
  "publishConfig": {
52
51
  "access": "public"
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createRollupOptions = exports.rollupExecutor = void 0;
4
4
  const ts = require("typescript");
5
5
  const rollup = require("rollup");
6
- const peerDepsExternal = require("rollup-plugin-peer-deps-external");
7
6
  const plugin_babel_1 = require("@rollup/plugin-babel");
8
7
  const path_1 = require("path");
9
8
  const autoprefixer = require("autoprefixer");
@@ -105,7 +104,6 @@ exports.rollupExecutor = rollupExecutor;
105
104
  // -----------------------------------------------------------------------------
106
105
  async function createRollupOptions(options, dependencies, context, packageJson, sourceRoot, npmDeps) {
107
106
  const useBabel = options.compiler === 'babel';
108
- const useTsc = options.compiler === 'tsc';
109
107
  const useSwc = options.compiler === 'swc';
110
108
  const tsConfigPath = (0, devkit_1.joinPathFragments)(context.root, options.tsConfig);
111
109
  const configFile = ts.readConfigFile(tsConfigPath, ts.sys.readFile);
@@ -143,9 +141,6 @@ async function createRollupOptions(options, dependencies, context, packageJson,
143
141
  main: options.main,
144
142
  projectRoot: options.projectRoot,
145
143
  }),
146
- peerDepsExternal({
147
- packageJsonPath: options.project,
148
- }),
149
144
  postcss({
150
145
  inject: true,
151
146
  extract: options.extractCss,
@@ -229,7 +224,10 @@ async function createRollupOptions(options, dependencies, context, packageJson,
229
224
  ...finalConfig,
230
225
  ...config,
231
226
  plugins: [
232
- ...(finalConfig.plugins?.length > 0 ? finalConfig.plugins : []),
227
+ ...(Array.isArray(finalConfig.plugins) &&
228
+ finalConfig.plugins?.length > 0
229
+ ? finalConfig.plugins
230
+ : []),
233
231
  ...(config.plugins?.length > 0 ? config.plugins : []),
234
232
  ],
235
233
  };
@@ -8,7 +8,9 @@ const devkit_1 = require("@nx/devkit");
8
8
  const calculate_hash_for_create_nodes_1 = require("@nx/devkit/src/utils/calculate-hash-for-create-nodes");
9
9
  const js_1 = require("@nx/js");
10
10
  const get_named_inputs_1 = require("@nx/devkit/src/utils/get-named-inputs");
11
- const loadConfigFile = require("rollup/dist/loadConfigFile");
11
+ // This import causes an error due to the module resolution used. If we switch to bundler or nodenext in the future we remove this ignore.
12
+ // @ts-ignore
13
+ const loadConfigFile_1 = require("rollup/loadConfigFile");
12
14
  const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'rollup.hash');
13
15
  const targetsCache = (0, fs_1.existsSync)(cachePath) ? readTargetsCache() : {};
14
16
  const calculatedTargets = {};
@@ -54,7 +56,7 @@ exports.createNodes = [
54
56
  ];
55
57
  async function buildRollupTarget(configFilePath, projectRoot, options, context) {
56
58
  const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
57
- const rollupConfig = (await loadConfigFile((0, devkit_1.joinPathFragments)(context.workspaceRoot, configFilePath))).options;
59
+ const rollupConfig = (await (0, loadConfigFile_1.loadConfigFile)((0, devkit_1.joinPathFragments)(context.workspaceRoot, configFilePath))).options;
58
60
  const outputs = getOutputs(rollupConfig, projectRoot);
59
61
  const targets = {};
60
62
  targets[options.buildTargetName] = {