Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose path to Draft.css for usage by CSS pre-processors
**what is the change?:** CREDIT TO @darobin for this change, originally made in facebookarchive#566 --- Some CSS pre-processors understand node_modules and are able to @import without requiring an absolute path. However, without assistance from the module all that they can resolve is its root directory. This leads to @import statements like the following: ``` @import "draft-js/dist/Draft.css"; ``` While this works, it requires internal knowledge of the package's layout. This requires digging around and if the layout changes, this breaks. These pre-processors also recognise a style field in package.json, which is the equivalent of main for CSS. This allows one to import thusly: ``` @import "draft-js"; ``` It's a small change, but it helps!
- Loading branch information