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

Generate unminified stimulus.umd.js #151

Merged
merged 1 commit into from Apr 26, 2018

Conversation

Projects
None yet
2 participants
@javan
Copy link
Contributor

javan commented Apr 24, 2018

What
This change stops minifying stimulus.umd.js, and switches from webpack to rollup because it generates cleaner, smaller JavaScript bundles (see comparison).

Why
The current stimulus.umd.js distributable is minified (compressed and mangled), an optimization that offers little to no benefit:

  • Minifying makes it difficult to track errors back to their source files
  • Most applications do their own minification
  • Build systems like webpack that support module in package.json don't use the UMD file

Example build: https://gist.github.com/javan/999900e42023e105de55733147f36af3
Interactive demo: https://beta.observablehq.com/@javan/stimulus

@sstephenson sstephenson added this to the 1.1 milestone Apr 25, 2018

@javan javan merged commit 5b52a44 into master Apr 26, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@javan javan deleted the unminify-umd branch Apr 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.