Skip to content

Commit

Permalink
Create webpack.md (#380)
Browse files Browse the repository at this point in the history
* Create webpack.md

* Update webpack.md
  • Loading branch information
greggb authored and Kye Hohenberger committed Oct 5, 2017
1 parent 735c986 commit 323d71f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/webpack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Usage with Webpack

#### Bundling [extracted CSS](https://github.com/emotion-js/emotion/blob/master/docs/extract-static.md)

```javascript
{
test: /emotion\.css$/,
// extract a css bundle file for production
use: PROD
? ExtractTextPlugin.extract({
fallback: 'style-loader',
use: {
loader: 'css-loader',
options: {
sourceMap: true,
modules: true
}
}
})
// extract css into a style tag
: ['style-loader', 'css-loader']
},
```

0 comments on commit 323d71f

Please sign in to comment.