Skip to content

Commit dfaa006

Browse files
authored
refactor: update to rollup 4 (#28459)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The vue, vue-router, react, and react-router packages are bundled with a version of rollup that are 2 major versions out of date. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Update deps to rollup 4 and made any necessary changes as a result of breaking changes - Removed the react projects old treeshaking script. The rollup dep used was incompatible with Rollup 4, and the script didn't work to begin with. - Removed the source maps and resolve plugins. These did not make any difference in the final result, and source maps are still included in the final build. - Removed a PURE annotation from an import. Rollup 4 warns about this, and this PURE annotation does not seem to be needed since every import in this file uses "createReactComponent" to begin with. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent dfafb27 commit dfaa006

File tree

14 files changed

+8159
-4619
lines changed

14 files changed

+8159
-4619
lines changed

packages/react-router/package-lock.json

Lines changed: 1599 additions & 967 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-router/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"devDependencies": {
4848
"@ionic/eslint-config": "^0.3.0",
4949
"@ionic/prettier-config": "^2.0.0",
50-
"@rollup/plugin-node-resolve": "^8.1.0",
5150
"@rollup/plugin-typescript": "^11.1.5",
5251
"@types/node": "^14.0.14",
5352
"@types/react": "16.14.0",
@@ -63,8 +62,7 @@
6362
"react-router": "^5.0.1",
6463
"react-router-dom": "^5.0.1",
6564
"rimraf": "^3.0.2",
66-
"rollup": "^2.26.4",
67-
"rollup-plugin-sourcemaps": "^0.6.2",
65+
"rollup": "^4.2.0",
6866
"typescript": "^4.0.5"
6967
},
7068
"prettier": "@ionic/prettier-config"

packages/react-router/rollup.config.js renamed to packages/react-router/rollup.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import sourcemaps from 'rollup-plugin-sourcemaps';
2-
import resolve from '@rollup/plugin-node-resolve';
31
import typescript from '@rollup/plugin-typescript';
42

53
export default {
@@ -14,7 +12,5 @@ export default {
1412
external: (id) => !/^(\.|\/)/.test(id),
1513
plugins: [
1614
typescript(),
17-
resolve(),
18-
sourcemaps()
1915
],
2016
};

0 commit comments

Comments
 (0)