Skip to content

Instantly share code, notes, and snippets.

@gregtap
Created December 16, 2015 03:43
Show Gist options
  • Select an option

  • Save gregtap/a57391c6d1ff2e984606 to your computer and use it in GitHub Desktop.

Select an option

Save gregtap/a57391c6d1ff2e984606 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
var bowerDir = __dirname + '/bower_components';
var config = module.exports = {
// the base path which will be used to resolve entry points
context: __dirname,
// the main entry point for our application's frontend JS
entry: './live_app/static/js/app/boot.js',
};
config.output = {
path: path.join(__dirname, 'live_app', 'static', 'dist'),
// the filename of the compiled bundle, e.g. app/assets/javascripts/bundle.js
filename: 'webpack_bundle.js',
};
config.resolve = {
// tell webpack which extensions to auto search when it resolves modules. With this,
// you'll be able to do `require('./utils')` instead of `require('./utils.js')`
extensions: ['', '.js'],
};
config.module = {
noParse: [bowerDir],
};
config.plugins = [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment