Created
November 12, 2015 03:26
-
-
Save sorentwo/c565b063b66f4b9cbb3c to your computer and use it in GitHub Desktop.
Webpack with extract text
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
var webpack = require("webpack"); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin") | |
module.exports = { | |
entry: "./web/static/app/app.js", | |
output: { | |
path: "./priv/static/js", | |
filename: "app.js" | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.coffee$/, loader: 'coffee-loader' }, | |
{ test: /\.(js|jsx)$/, loader: "babel-loader", exclude: /node_modules/ }, | |
{ test: /\.scss$/, loader: ExtractTextPlugin.extract("css!autoprefixer!sass?outputStyle=compact") } | |
] | |
}, | |
resolve: { | |
extensions: ["", ".js", ".jsx", ".coffee"] | |
}, | |
plugins: [ | |
new ExtractTextPlugin("../css/app.css", { | |
allChunks: true | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment