Created
January 18, 2018 07:00
-
-
Save alihesari/186b03bd8d79857870dc3afc8f537adf to your computer and use it in GitHub Desktop.
This file contains 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 path = require('path'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
module.exports = { | |
entry: './src/js/main.js', | |
output: { | |
path: path.resolve(__dirname, 'dist/'), | |
publicPath: 'dist/', | |
filename: 'bundle.js' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.scss$/, | |
use: ExtractTextPlugin.extract({ | |
fallback: 'style-loader', | |
use: [ | |
{ | |
loader: 'css-loader', | |
options: { | |
// minimize: true | |
} | |
}, | |
{ | |
loader: 'sass-loader' | |
}, | |
] | |
}) | |
}, | |
{ | |
test: /\.(png|jpg|jpeg|woff|woff2|eot|ttf|svg)$/, | |
loader: 'url-loader', | |
query: { | |
limit: 10000, | |
name: '[name].[ext]' | |
} | |
} | |
] | |
}, | |
plugins: [ | |
new ExtractTextPlugin('[name].css', { allChunks: true }), | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment