Created
November 14, 2016 13:49
-
-
Save bitttttten/198ed5e1445fcc2f3d9a8d5cb9445328 to your computer and use it in GitHub Desktop.
webpack loaders. because you only want to write this -once-
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = [ | |
| { | |
| test: /\.jsx?$/, | |
| loader: 'babel', | |
| }, | |
| { | |
| test: /\.css$/, | |
| loader: 'style-loader!css-loader', | |
| }, | |
| { | |
| test: /\.json$/, | |
| loader: 'json-loader', | |
| }, | |
| { | |
| test: /\.sass/, | |
| loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded&indentedSyntax', | |
| }, | |
| { | |
| test: /\.scss/, | |
| loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded', | |
| }, | |
| { | |
| test: /\.less/, | |
| loader: 'style-loader!css-loader!less-loader', | |
| }, | |
| { | |
| test: /\.styl/, | |
| loader: 'style-loader!css-loader!stylus-loader', | |
| }, | |
| { | |
| test: /\.(png|jpg|gif|woff|woff2)$/, | |
| loader: 'url-loader?limit=8192', | |
| }, | |
| { | |
| test: /\.(mp4|ogg|svg)$/, | |
| loader: 'file-loader', | |
| } | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment