var path = require('path'); module.exports = { entry: './index.js', module: { loaders: [ { test: /\.js$/, exclude: /(node_modules|bower_components)/, loader: 'babel-loader', query: { presets: ['env'] } } ] }, output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist') } };