Skip to content

build: replace webpack with rollup in order to optimize bundle#118

Merged
remarkablemark merged 3 commits intomasterfrom
build/rollup
Jul 9, 2019
Merged

build: replace webpack with rollup in order to optimize bundle#118
remarkablemark merged 3 commits intomasterfrom
build/rollup

Conversation

@remarkablemark
Copy link
Copy Markdown
Owner

File Webpack Rollup
html-react-parser.js 53K 43K
html-react-parser.min.js 17K 15K
html-react-parser.min.js.map 70K 64K

Save devDependencies:

* rollup@1.16.2
* rollup-plugin-commonjs@10.0.0
* rollup-plugin-node-resolve@5.0.4
* rollup-plugin-uglify@6.0.2

Remove `webpack.config.js` and add `rollup.config.js`

Update npm scripts `build:min` and `build:unmin`
```
(!) Mixing named and default exports
Consumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `output.exports: 'named'` to disable this warning
```

This fixes the UMD bundle (in `dist`) as the library can only be
accessed via the default export.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 00a4aad on build/rollup into 474c8cd on master.

@remarkablemark remarkablemark merged commit d1c3ad8 into master Jul 9, 2019
@remarkablemark remarkablemark deleted the build/rollup branch July 9, 2019 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants