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

Skip dead branches of a conditional expression. #465

Merged
merged 1 commit into from
Jan 31, 2016

Conversation

eventualbuddha
Copy link
Contributor

This allows replacement of inline conditions such as in export const resolve = isWindows ? win32Resolve : posixResolve;.

This allows replacement of inline conditions such as in `export const resolve = isWindows ? win32Resolve : posixResolve;`.
@Victorystick
Copy link
Contributor

@eventualbuddha This looks great! Are you reimplementing Node's path module in ES2015? I've thinking about what Node's builtin modules would look like if rewritten in ES2015, and how well they could be bundled by Rollup. This is a great step in the right direction! 👍

@eventualbuddha
Copy link
Contributor Author

@Victorystick yes, exactly. I'll share once I get this merged and tested out. The only thing I'm not sure of how to handle is how to trigger the inlining of isWindows. I'd rather not hardcode that specific case.

Rich-Harris added a commit that referenced this pull request Jan 31, 2016
…branches

Skip dead branches of a conditional expression.
@Rich-Harris Rich-Harris merged commit 6200ade into master Jan 31, 2016
@Rich-Harris Rich-Harris deleted the skip-dead-conditional-expression-branches branch January 31, 2016 19:00
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.

None yet

3 participants