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

update dependencies #65

Merged
merged 2 commits into from
Jan 18, 2019
Merged

update dependencies #65

merged 2 commits into from
Jan 18, 2019

Conversation

Rich-Harris
Copy link
Owner

This updates Rollup to 1.0, enabling Packd to handle .mjs files (fixes #63). It also replaces uglify-js with Terser, which means it can minify ES2015 packages instead of bailing and serving unminified code.

@Rich-Harris
Copy link
Owner Author

Also closes #4

Copy link
Collaborator

@xtuc xtuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Rich-Harris, thanks for your PR!


if ( bundle.imports.length > 0 ) {
if ( result.output.length > 1 ) {
info( `[${pkg.name}] generated multiple chunks, trying Browserify instead` );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In which case does Rollup genrate multiple chunks for a lib?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of any. It's really just there as a fallback — since Rollup now supports code-splitting for apps, it will always emit an array of chunks, and this is just a sanity check before we return the contents of the first chunk

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think dynamic import() might produce multiple chunks.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought about that, but I don't think it's commonly used on npm?

@Rich-Harris Rich-Harris merged commit c14d17d into master Jan 18, 2019
@Rich-Harris
Copy link
Owner Author

I'll bump the version number — also, I was thinking of running the code through Prettier, any objections? I've abandoned jQuery style, it's a little dated...

@Rich-Harris Rich-Harris deleted the update-dependencies branch January 18, 2019 14:28
@xtuc
Copy link
Collaborator

xtuc commented Jan 18, 2019

Thank you, I'll ensure bundle.run is up-to-date and i'm fine with Prettier.

@Rich-Harris
Copy link
Owner Author

Cool — tagged 2.7.0. Thanks for taking care of bundle.run!

@xtuc xtuc mentioned this pull request Jan 21, 2019
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.

Server error
3 participants