Skip to content

ci: Update rollup setup#8953

Merged
brophdawg11 merged 19 commits into
devfrom
brophdawg11/rollup
Jun 10, 2022
Merged

ci: Update rollup setup#8953
brophdawg11 merged 19 commits into
devfrom
brophdawg11/rollup

Conversation

@brophdawg11

@brophdawg11 brophdawg11 commented Jun 8, 2022

Copy link
Copy Markdown
Contributor

Same as remix-run/remix#3376 for this repo.

  • Updates rollup to the latest version (4f62c1e)
  • Splits the rollup.config.js files out into the individual packages/* directories (c04c2d8)
  • Keeps the root rollup.config.js which automatically loads all packages/*/rollup.config.js files and does a full build
  • Removes tsc -b and moves to @rollup/plugin-typescript to generate .d.ts files

This allows us to run npx rollup -c [--watch] from either the root or the individual package directories.

This also moves the build output to packages/*/dist/ directories and does a few things that stemmed from that:

  • Updates package.json main/module/types references
  • Adds moduleNameMappers to jest configs to avoid running unit tests on dist/ folder contents

Comment thread packages/react-router-dom/__tests__/DataBrowserRouter-test.tsx Outdated
Comment thread packages/react-router-dom/__tests__/DataBrowserRouter-test.tsx
Comment thread package.json Outdated
Comment thread packages/react-router-dom/jest.config.js
Comment thread packages/react-router/__tests__/DataMemoryRouter-test.tsx
Comment thread packages/react-router-dom/__tests__/data-static-router-test.tsx Outdated
@brophdawg11 brophdawg11 marked this pull request as ready for review June 9, 2022 16:05
Comment thread packages/react-router-dom/__tests__/nav-link-active-test.tsx Outdated
Comment thread packages/react-router-dom/rollup.config.js
Comment thread package.json
},
"scripts": {
"build": "rollup -c && tsc -b",
"build": "rollup -c",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.d.ts files are generated by @rollup/plugin-typescript now

"main": "./dist/main.js",
"unpkg": "./dist/umd/react-router.production.min.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",

@brophdawg11 brophdawg11 Jun 9, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a note - Chance's changesets PR will be adding the proper files arrays to package.json - left out of here to avoid conflicts

@brophdawg11 brophdawg11 merged commit 49af8da into dev Jun 10, 2022
@brophdawg11 brophdawg11 deleted the brophdawg11/rollup branch June 10, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants