Skip to content

Upgrade to modern version of Rollup and related plugins #24894

Closed
@0xdevalias

Description

@0xdevalias

The inspiration for this came from @jasonwilliams 's PR for attempting to add sourcemap output support to React's builds:

But I figured that it would be useful to minimise the scope of changes in that PR, and to modernise the build tooling along the way.


There have been quite a few version releases for Rollup and the plugins that are currently used, as well as a number of the official Rollup plugins changing package name to use the @rollup/* package prefix.

Looking at package.json we can see all of the current Rollup packages:

// ..snip..
    "rollup": "^1.19.4",
    "rollup-plugin-babel": "^4.0.1",
    "rollup-plugin-commonjs": "^9.3.4",
    "rollup-plugin-node-resolve": "^2.1.1",
    "rollup-plugin-prettier": "^0.6.0",
    "rollup-plugin-replace": "^2.2.0",
    "rollup-plugin-strip-banner": "^0.2.0",
// ..snip..

And using grep, we can see some additional usages under packages/:

⇒  grep -r 'rollup' package.json packages/*/package.json
package.json:    "rollup": "^1.19.4",
package.json:    "rollup-plugin-babel": "^4.0.1",
package.json:    "rollup-plugin-commonjs": "^9.3.4",
package.json:    "rollup-plugin-node-resolve": "^2.1.1",
package.json:    "rollup-plugin-prettier": "^0.6.0",
package.json:    "rollup-plugin-replace": "^2.2.0",
package.json:    "rollup-plugin-strip-banner": "^0.2.0",
package.json:    "build": "node ./scripts/rollup/build.js",
package.json:    "build-combined": "node ./scripts/rollup/build-all-release-channels.js",
package.json:    "lint-build": "node ./scripts/rollup/validate/index.js",
packages/react-devtools-extensions/package.json:    "rollup": "^1.19.4",
packages/react-devtools-extensions/package.json:    "rollup-plugin-babel": "^4.0.1",
packages/react-devtools-extensions/package.json:    "rollup-plugin-commonjs": "^9.3.4",
packages/react-devtools-extensions/package.json:    "rollup-plugin-node-resolve": "^2.1.1",

The following is an attempt to capture all of the relevant information about package name changes, new versions, breaking changes, etc for these packages:

If any of these updates rely on a node version later than 10.x, then the following PR may have to land first, otherwise things might break on AppVeyor:


My plan/intent is to work through all of this and create a PR updating Rollup and the related plugins; but I wanted to create this issue in the meantime to capture what I have done so far, and also check whether there would be any issues/concerns with a PR like this being made.

Edit: PR opened in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions