Skip to content

Instantly share code, notes, and snippets.

@Kobold
Created September 10, 2014 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kobold/fd5e246433b7a276df26 to your computer and use it in GitHub Desktop.
Save Kobold/fd5e246433b7a276df26 to your computer and use it in GitHub Desktop.
An example webpack config that I'm not sure handles external dependencies correctly.
var path = require('path');
module.exports = {
entry: {
module1: './static/js/module1.js',
module2: './static/jsx/module2.jsx',
module3: [
'./static/vendor/drop/drop.min.js',
'./static/vendor/jquery-timepicker-jt/jquery.timepicker.js',
'./static/jsx/module3.jsx',
],
module4: [
'./static/vendor/jquery-ui/ui/minified/jquery-ui.min.js',
'./static/vendor/fancybox/source/jquery.fancybox.js',
'./static/vendor/fancybox/source/helpers/jquery.fancybox-thumbs.js',
'./static/vendor/bootstrap3/dist/js/bootstrap.min.js',
'./static/jsx/module4.jsx',
],
},
module: {
loaders: [
{ test: /\.jsx$/, loader: 'jsx-loader' }
]
},
output: {
path: path.join(__dirname, 'static/dist/js'),
filename: '[name].bundle.js'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment