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

Add microbundle to output more optimal bundles #401

Merged
merged 34 commits into from
Sep 23, 2020
Merged

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Sep 17, 2020

What changed?

The PR introduces Microbundle into the build flow to output more optimal bundles and for a larger range of entry points such as:

  • scripts.js - The CommonJS bundle under the main, perfect for Node.
  • scripts.esm.js - The ES module bundle under the module, perfect for consumption in bundlers.
  • scripts.umd.js - The universal module definition build under the unpkg field, perfect for CDNs.
  • scripts.modern.js- A modern bundle specially designed to work in all modern browsers.

Included in this work is also a refactor of distribution, production ready bundles and uncompressed development options. Uncompressed files are created in the new dev directory while the minified versions of those same files can be found in dist. This replaces the previous .min and non .min files that were before also placed in dist. New bundle output for components share this format (excluding .map files):

/dev/
  scripts.js
  scripts.esm.js
  scripts.umd.js
  scripts.modern.js
  styles.css
/dist/
  scripts.js
  scripts.esm.js
  scripts.umd.js
  scripts.modern.js
  styles.css

Release checklist

  • Switch docs to Microbundle and only output iife bundle.
  • Remove now unused package dependencies (if any).
  • Update documentation with details on new bundles and how to use them as well as CDN information.
  • Maybe output dev bundles in .gitignore'ed directory for debugging and testing.
  • Remove dist (and dev, if created) directories from github commits and only serve with NPM.

@sebnitu sebnitu marked this pull request as ready for review September 23, 2020 03:29
@sebnitu sebnitu changed the title Add microbundle to output a more optimal bundles Add microbundle to output more optimal bundles Sep 23, 2020
@sebnitu sebnitu merged commit af7065d into master Sep 23, 2020
@sebnitu sebnitu deleted the add-microbundle branch September 23, 2020 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant