Skip to content

Commit c978b1c

Browse files
committed
fix: Remove unused polyfills and update build config
Removes polyfills for `Object.assign` and `Set` which, as far as I can tell, are unused in the codebase. Updates `webpack` from 3 to 4. Replaces `babel-preset-es2015` with `babel-preset-env`. Reduces the minified bundle size (`feather.min.js`) by **9.3kB** (72.4kB to 63.1kB). Does not change any functionality of the library.
1 parent bd129d9 commit c978b1c

File tree

5 files changed

+4954
-641
lines changed

5 files changed

+4954
-641
lines changed

.babelrc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2-
"presets": ["es2015"],
3-
"plugins": ["transform-object-rest-spread"]
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"targets": {
7+
"browsers": ["last 2 versions"]
8+
}
9+
}
10+
],
11+
"stage-2"
12+
]
413
}

bin/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ mkdir dist/icons
2121
./node_modules/.bin/babel-node bin/build-svgs.js
2222

2323
# Build JavaScript library
24-
./node_modules/.bin/webpack --output-filename feather.js
25-
./node_modules/.bin/webpack --output-filename feather.min.js -p
24+
./node_modules/.bin/webpack --output-filename feather.js --mode development
25+
./node_modules/.bin/webpack --output-filename feather.min.js --mode production

0 commit comments

Comments
 (0)