-
Notifications
You must be signed in to change notification settings - Fork 52
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
Babel 6 and dep updates #63
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3ce6d50
babel and dependencies updated
rosskevin cb2d4d7
update failed test assertion
rosskevin c695116
add travis
rosskevin c83a042
remove transform-runtime, downgrade react-input-message to 0.9.2
rosskevin 438331c
'babel' removed, now it's babel-cli expected to be installed globally
rosskevin aa77afb
add babel-cli
rosskevin 7d673e1
unnecessary to use passPerPreset
rosskevin 1c8acec
merged latest master - test failures on master still present here: ht…
rosskevin 6d6984b
Merge branch 'master' into babel-6-and-dep-updates
rosskevin 7cc7f1f
reverted globalize version
rosskevin 6b30e2f
add jsnext:main for source resolution
rosskevin 02b8e34
Revert "add jsnext:main for source resolution"
rosskevin 5a0e527
reverted lodash/less dependencies for docs
rosskevin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not correct –
jsnext:main
should be code transpiled to use ES modules rather than CJS modules, not the untranspiled source.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.
I'm not following you. The source appears to me to be ES2015, and tools that acknowledge
jsnext:main
can consume it as part of their transpilation pipelines. So as far as my experience with rollup goes, I need to do nothing to thesrc
and this will work fine. Can you point to my misunderstanding?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.
The source is not ES2015 – it's whatever is valid Babel stage 0.
Moreover the target for
jsnext:main
isn't ES2015 anyway – it's ES5 with ES modules (rather than CJS modules).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.
the big thing here is that the source uses jsx, which isn't valid javascript at all in its uncompleted form
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.
Let me restate then.
jsnext:main
isn't a standard, it's a pseudo and not one that is fully adopted. I don't think we want to bike shed it intojsnext:main:jsx
or something like that in order to allow an app to use it. I see the point of wanting to constrain it to ES only, but what ES only app (have to assume it is react, though not necessarily jsx) would use this UI-only library in a transpilation pipeline that couldn't handle JSX? I realize this is a bigger and more complicated conversation, but lacking another meta indicator, why not use this until we have another way? As-is, I still have to go out of my way to include this in my webpack pipeline.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.
you are right we don't want bikeshedding anything, we don't need an indicator for general untranspiled code, the src folder signals enough.
JSNEXT is specifically for signally to environments and bundlers where the es module versions of your code is as an interminable solution until transpilation of modules isn't needed because they are natively supported. using it however we feel defeats the usefulness and validity of the convention ppl are trying to establish to solve a specific problem.
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.
not sure what you mean about going out of your way to include this with webpack though... are you saying you can't just require it? you shouldn't have to configure anything to use this.
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.
Unfortunately, webpack doesn't look to resolve
jsnext:main
: webpack/webpack#1979 (comment)I'm prototyping some local resolver code that will add these to my src loader pipeline, but it is really naive and only one level down. Without some kind of indicator, I'll be leaving out react-formal. Not a big deal, I'm just looking for a way to move forward.
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's not clear why you'd even need webpack to look at that it already understands
main
. The code is already compiled there is nothing else to be done. Eventually you can get things like tree shaking in webpack 2 but again the point is not to have a general entry point for uncompiled code, but as a way to say "this is where code is that's in the es module format"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.
I'm looking at tree shaking and general benefits of navigating code while developing. My local workaround failed miserably, so we are pretty much stuck until webpack catches up and some standardization happens anyway.