Created
February 9, 2018 14:50
-
-
Save petyosi/4aadfe6790d2d64c34694b8507afb5b5 to your computer and use it in GitHub Desktop.
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
const path = require('path'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
module.exports = { | |
entry: './src/index.js', | |
output: { | |
path: path.resolve(__dirname, './dist/'), | |
filename: 'bundle.js', | |
publicPath: 'dist/' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
exclude: /node_modules/, | |
query: { | |
presets: ['es2015'] | |
} | |
}, | |
{ | |
test: /\.css$/, | |
loader: ExtractTextPlugin.extract('css-loader') | |
}, | |
{ | |
test: /\.png$/, | |
loaders: [ | |
'url-loader?limit=5000', | |
'image-webpack-loader' | |
] | |
} | |
] | |
}, | |
plugins: [ | |
new ExtractTextPlugin('style.css') | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment