Skip to content

Instantly share code, notes, and snippets.

@matheuslc
Last active May 8, 2016 23:01
Show Gist options
  • Save matheuslc/06aee04dba5c8125b9000b8f09cdfebb to your computer and use it in GitHub Desktop.
Save matheuslc/06aee04dba5c8125b9000b8f09cdfebb to your computer and use it in GitHub Desktop.
webpack.config.js
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
app: path.resolve(__dirname, 'src/js/main.js')
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js',
publicPath: 'dist/'
},
module: {
loaders: [{
test: /\.js?$/,
exclude: path.resolve(__dirname, 'node_modules'),
loader: 'babel'
}, {
test: /\.scss$/,
loader: 'style!css!sass'
}, {
test: /\.(png|jpg|gif)$/,
loader: 'url-loader?limit=1&name=img/[name].[ext]'
}],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment