-
-
Save kyleshevlin/c155b001266e31c56288e73f370351ea 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 webpack = require('webpack'); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const javascript = { | |
test: /\.(js)$/, | |
use: [{ | |
loader: 'babel-loader', | |
options: { presets: ['es2015'] } | |
}], | |
}; | |
const styles = { | |
test: /\.(scss)$/, | |
use: ExtractTextPlugin.extract({ | |
fallbackLoader: 'style-loader', | |
loader: 'css-loader?sourceMap!sass-loader?sourceMap' | |
}) | |
}; | |
const uglify = new webpack.optimize.UglifyJsPlugin({ | |
compress: { warnings: false } | |
}); | |
const config = { | |
entry: { | |
App: './public/javascripts/delicious-app.js' | |
}, | |
devtool: 'source-map', | |
output: { | |
path: path.resolve(__dirname, 'public', 'javascripts', 'dist'), | |
filename: '[name].bundle.js' | |
}, | |
module: { | |
rules: [javascript, styles] | |
}, | |
plugins: [ | |
new ExtractTextPlugin('please-just-make-this-a-file.css'), | |
] | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment