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.
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
Mutations #10
Mutations #10
Changes from 5 commits
2ee2686
98f9039
3441108
03dc4a9
2b31f7d
ea84141
20d975b
31e3d30
feee73f
4c61778
f242ee3
f272b34
6272d9a
7ed7b9c
d9ceb40
6a14b59
1c53960
4e96fa8
9ff22b0
473952f
67d7f0a
6c5c385
8cb2dec
83adcd3
b64ad77
3de5850
10abcd1
f1238af
1f37afa
6511624
c298c6d
6f7a1ef
bd968b0
ca1fbde
68dc6b5
6e36176
fbe9956
a9221ff
5c7c3ad
b4c6035
9df0802
a55ccbb
aa8973d
c3812d8
3a57d7b
b75e514
4c81863
79fe623
6d7fe02
113aab5
b223207
6d07744
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'd think that it's pretty common and can be achieved with a transpiler and bundler, but I don't have much experience with that either. Bundling everything together into a single file at least should be no problem. Maybe ES2015 / ES6 is the better target nowadays?
Another question is the module system to use for exporting from the bundle (CommonJS, UMD, ...)?
@nenadjaja may have more experience with transpiling to older JS versions and bundling.
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.
https://www.tutorialspoint.com/babeljs/babeljs_transpile_es6_modules_to_es5.htm looks promising (webpack + babel with a single output file). I bet there are better guides out there though.
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.
Thanks so much for this link, it was able to help me find a configuration that worked.
I've run into one last problem: building for a node environment and the browser requires different "target" types in the webpack config. I'm looking into solutions now, but I have a feeling we may end up needing to support something along the lines of:
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 the error I receive when trying to use a "node bundle" within the browser:
This is because...
Taken from this response: liady/webpack-node-externals#17 (comment)
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 sure why there even is a need to import anything. It's a bundle after all. I think I'll need some hands-on time with the bundling to figure something out.
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.
Ahh that's very true, will investigate further.