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
Bundle with Rollup #96
Conversation
const prod = process.env.PRODUCTION | ||
const mode = prod ? 'production' : 'development' | ||
|
||
console.error(`creating ${mode} bundle...`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a console.error
? (can we also capitalize the first c
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because that prints to stderr
(i.e. metadata) rather than stdout
(i.e. data). No actual difference, just force of habit! Can change to console.log
(or remove altogether) if you prefer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes me feel weird to console.error
on every build, I'd prefer it to be console.log
! 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have some before/after stats? (or are they the same as in the original comment, i.e. 13% smaller UMD build and 60% quicker parse?)
if (id === processShim) return 'export default { argv: [], env: {} }' | ||
return null | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get some comments in the file what this whole block is needed for? We'll need to maintain this, so not having any idea what this is there for is a big unfortunate!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Yep, nothing has changed from earlier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
As discussed in #87. This change only affects people who are using the
dist
files (their app will get smaller and boot faster) and people using Webpack 2 or Rollup (allows them to consume the library as an ES module).