Skip to content

Commit

Permalink
Add instructions for including 3rd party packages in bundle (#148)
Browse files Browse the repository at this point in the history
See discussion in issue #92 #92
  • Loading branch information
tylerpaige committed Jan 21, 2024
1 parent 7638f92 commit 9075819
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -60,6 +60,15 @@ Watch out - if you precompile your files locally, those will be served over the
rails assets:clobber
```

### How do I include 3rd party stylesheets from `node_modules` in my bundle?

Use an `@import` statement and path to a specific stylesheet, omitting the `node_modules/` segment and the file's extension. For example:

```scss
/* Desired file is at at node_modules/select2/dist/css/select2.css */
@import "select2/dist/css/select2";
```

## License

CSS Bundling for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).

0 comments on commit 9075819

Please sign in to comment.