Skip to content

Commit 0b16f86

Browse files
authored
chore: Replaces rollup-plugin-size-snapshot with rollup-plugin-analyzer (#837)
This is done to support node >16, because `rollup-plugin-size-snapshot` has a dependency to `webpack`.
1 parent a471d27 commit 0b16f86

File tree

3 files changed

+33
-2120
lines changed

3 files changed

+33
-2120
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@
132132
"react-test-renderer": "^18.2.0",
133133
"rimraf": "^3.0.1",
134134
"rollup": "^2.67.1",
135+
"rollup-plugin-analyzer": "^4.0.0",
135136
"rollup-plugin-babel": "^4.4.0",
136137
"rollup-plugin-node-resolve": "^5.2.0",
137-
"rollup-plugin-size-snapshot": "^0.12.0",
138138
"shallowequal": "^1.1.0",
139139
"title-case": "^3.0.3",
140140
"typescript": "4.8.3",

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22
import babel from 'rollup-plugin-babel';
33
import resolve from 'rollup-plugin-node-resolve';
4-
import { sizeSnapshot } from 'rollup-plugin-size-snapshot';
4+
import analyze from 'rollup-plugin-analyzer';
55
import pkg from './package.json';
66

77
const babelRuntimeVersion = pkg.dependencies['@babel/runtime'].replace(
@@ -31,7 +31,7 @@ function createESMConfig(input, output) {
3131
sourceMaps: true,
3232
inputSourceMap: true,
3333
}),
34-
sizeSnapshot(),
34+
analyze({ summaryOnly: true }),
3535
],
3636
};
3737
}
@@ -52,7 +52,7 @@ function createCommonJSConfig(input, output) {
5252
sourceMaps: true,
5353
inputSourceMap: true,
5454
}),
55-
sizeSnapshot(),
55+
analyze({ summaryOnly: true }),
5656
],
5757
};
5858
}

0 commit comments

Comments
 (0)