Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(esm build): build ES modules for browser #2705

Merged
merged 3 commits into from
Apr 11, 2019
Merged

feat(esm build): build ES modules for browser #2705

merged 3 commits into from
Apr 11, 2019

Conversation

zigomir
Copy link
Contributor

@zigomir zigomir commented Apr 11, 2019

fixes #2589
Reviving #2590 (I deleted fork already)

For build size references:

Old build output

Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.js 64.41kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.min.js 23.74kb (gzipped: 8.36kb)
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.common.js 64.76kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.esm.js 64.74kb

vs

new build output

Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.js 64.41kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.min.js 23.81kb (gzipped: 8.37kb)
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.common.js 64.76kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.esm.js 64.74kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.esm.browser.js 60.45kb
Circular dependency: src/util/push-state.js -> src/util/scroll.js -> src/util/push-state.js
dist/vue-router.esm.browser.min.js 21.96kb (gzipped: 8.12kb)

Minify with terser instead of uglify-js (uglify-js doesn't support ES6)
@yyx990803 yyx990803 merged commit 627027f into vuejs:dev Apr 11, 2019
@zigomir zigomir deleted the esm-build-with-terser branch April 11, 2019 12:53
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.

Browser ES module build
2 participants