I also posted about this here but haven't heard anything.
The聽Blueprint docs聽say to use this:
@import "~@blueprintjs/core";
However, if I try that, I get this error from webpack:
Can't resolve '@blueprintjs/core.less'
@import "~@blueprintjs/core/dist/blueprint.css";
webpack doesn't like that either:
Module not found: Error: Can't resolve '@blueprintjs/core/dist/blueprint.css'
Looking in the聽dist/聽directory, I can see that there's only a JS file in there:
$ ls node_modules/\@blueprintjs/core/dist/
core.bundle.js
After some trial and error, I found that this works:
@import "~@blueprintjs/core/lib/css/blueprint.css";
But this doesn't seem right to me. Also, none of the icons are loaded via this method.
What's the correct way to do this?
Icons are not included in blueprint core anymore; there's a new package called @blueprintjs/icons.
@import "~@blueprintjs/core/lib/css/blueprint.css";
this is correct. most of the built assets moved from /dist/ to /lib/.
Ah, okay, I don't think that's in the docs anywhere. It looks like your v2 docs don't reflect some of the changes that have been made since v1.
For posterity:
@blueprintjs/core and @blueprintjs/icons need to be installed.@import '~@blueprintjs/core/lib/css/blueprint.css';
@import '~@blueprintjs/icons/lib/css/blueprint-icons.css';
Most helpful comment
Ah, okay, I don't think that's in the docs anywhere. It looks like your v2 docs don't reflect some of the changes that have been made since v1.
For posterity:
@blueprintjs/coreand@blueprintjs/iconsneed to be installed.