-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat(browser): build a dedicated version for the browser #242
Conversation
330bdf7
to
d2d78d7
Compare
@Spy-Seth Thanks for addressing this so quickly! I see that the output bundle contains parts of react code. Since I'm not familiar with rollup that much, is there a way to define an external dependency in rollup like there there is in webpack? That way you could just define the packages you depend on and the package consumer would have to supply them, making sure there's less code duplication and is no longer version dependent but rather API dependent. |
You right, I've forgotten to mark react, and react-dom has an external dependencies. I will add it. I not sure of my choice of rollup. I find it more efficient for library bundling. But so few people know him... Maybe webpack could be a more reasonable tool. |
3bc6f73
to
6223e4c
Compare
94e0a63
to
5b3a750
Compare
It's lighter without
|
Looks good, any blog post or article explaining all the reasoning behind the various build endpoints in package.json? |
You could have a look onto the rollup wiki for the For the By re-reading the
|
maybe @Haroenv can help? |
Seems good! What do you need help with Vincent? |
5b3a750
to
79da2c1
Compare
On this message #242 (comment), both you and @samouss have rollup experience and might help @Spy-Seth here |
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.
LGTM
Are we confident on this change to directly do a major release. Or should we make some RC before? |
79da2c1
to
19da4a7
Compare
I just fix a typo in the first commit message |
Do a major, we don't have any community nowaday to ask to test that for an RC I guess. What do you think? |
You could always test it on your own project and the person having the browser need could also test it. If you release it under a different tag. |
I will try to find some time this weekend for some test and we could release it in the next week 😃 |
19da4a7
to
93bd2c1
Compare
Any chance this could be merged without adding tests? |
BREAKING CHANGE: This PR change of the internal directory structure of the exported code. The previous code has move from the `dist/` into the `dist/esm` directory (but remender that we do not avice you to do use internals code 🤓)
93bd2c1
to
b2596f6
Compare
This comment has been minimized.
This comment has been minimized.
b2596f6
to
496f20f
Compare
01eb935
to
73683da
Compare
Thanks for taking the time @Spy-Seth, Vincent is currently off, but I'll remind him to review this when he's back |
LGTM and you can release. Awesome work!! |
Hello! Would love to use this to make my site work in IE 11. Anything I can do help it get released? |
I think we're just waiting for it to be published. |
@Spy-Seth Can I release the lib safely? Does it requires a major? |
Yes we could release it a major :) |
Ok doing it |
Fix #211
This PR introduce a bundled version of the lib on NPM. Now the project is distributed on two forms:
dist/esm/
: contains the same code has the previous one distributed on NPM. This code is designed to be used on with node and babel (we set themodule
entry inthe package.json
)dist/cjs/
: contains a bundled file that can be run in any ES2015 environment. Library users could have to polyfill their environment to make it ES2015 compliant. This bundled version is tagged as the default one and browser one inpackage.json
As the new build version became the default one. We will need to release a beta version to ensure everything works fine in most case.