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

Add minified bundles to distribution #612

Closed
adidahiya opened this issue Feb 3, 2017 · 12 comments · Fixed by #2241
Closed

Add minified bundles to distribution #612

adidahiya opened this issue Feb 3, 2017 · 12 comments · Fixed by #2241

Comments

@adidahiya
Copy link
Contributor

adidahiya commented Feb 3, 2017

Follow-up of #303, #588. Should not include sourcemaps.

@giladgray
Copy link
Contributor

the sourcemaps are already external files, not sure how much space there is to save by removing the //# lines?

@adidahiya
Copy link
Contributor Author

yeah, you're right, no need to remove those lines

@giladgray
Copy link
Contributor

@adidahiya so is there any work to actually do here? are you asking for a core.bundle.min.js?

@adidahiya
Copy link
Contributor Author

@giladgray yeah, that's what I mean. Just a nice convenience if I want to include blueprint on a static site in production with a <script> tag. Low priority, I'll actually bump this down to P3.

@adidahiya adidahiya added P3 and removed P2 labels Feb 6, 2017
@timelyportfolio
Copy link

Thanks so much for bundling. The bundle is very useful for using in R. I see that this is a low priority, but if you get around to addressing the bundle, I think I discovered a small problem. It seems classnames is not included in the bundle. I wish I knew enough about JavaScript bundling in the modern toolchain. I could not see anything obviously wrong. I will try to dig a little deeper.

without classnames

If I use blueprint-core and blueprint-table bundles, then I get the following error. Reproducible example

image

with classnames explicitly added

If I modify the above and explicitly include <script src="https://unpkg.com/classnames"></script>, then everything works as expected. example with classnames

image

@adidahiya
Copy link
Contributor Author

@timelyportfolio the bundles don't include any dependencies (those listed in "dependencies" in package.json)... you need to provide your own global versions of react with addons, classnames, dom4, etc.

@timelyportfolio
Copy link

great to know, thanks!

@giladgray
Copy link
Contributor

@adidahiya is it reasonable to close this request? i remember reaching a decision that minifying should be the responsibility of the application, not the library, as they'll have plenty of their own code to production-ize too.

@adidahiya
Copy link
Contributor Author

No, I'm still interested in this, but it's low priority. We just need to run one extra webpack build for the CI deployment step.

@adidahiya
Copy link
Contributor Author

This came up again, but for CSS. I am trying to build an app with web workers where workers are allowed to load blueprint styles but we want to do some dynamic processing of the stylesheet before adding it to the real DOM. It would be helpful to have a .css file without all the /** */ Sass comments to reduce the CSS parsing & processing burden.

@adidahiya
Copy link
Contributor Author

adidahiya commented Mar 8, 2018

Eh, actually, in the meantime, I can get by in webpack with

test: /\.css$/,
use: "css-loader?" + JSON.stringify({ minimize: { discardComments: { removeAll: true } } }),

bumping back down to P3.

@giladgray giladgray added this to the 2.0.0 milestone Mar 13, 2018
@giladgray
Copy link
Contributor

i would love to remove those comments from the published CSS file, so i'll look into a way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants