Skip to content
Snippets Groups Projects
Commit d244b20a authored by Joe Lencioni's avatar Joe Lencioni
Browse files

Replace svg-loader with babel-plugin-inline-react-svg

I want to do some optimizations on how react-dates is built, to help
reduce the bundle size impact of using this project. The first step I
see is reducing the size of each of the components, which we can achieve
by avoiding building them with webpack.

From what I can tell, webpack was only brought in to support getting
SVGs in these components. We can pretty easily replace this with a Babel
transform that will achieve the same result, but with less complexity in
our build, and a little less overhead in the resulting components.

Before this change:

```
~/react-dates ❯❯❯ du -hs lib/components
420K    lib/components
```

After this change:

```
~/react-dates ❯❯❯ du -hs lib/components
348K    lib/components
```
parent dffffea3
No related merge requests found
Showing
with 44 additions and 116 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment