knex/scripts/webpack.config.js

47 lines
786 B
JavaScript
Raw Normal View History

2015-04-29 17:11:52 -04:00
var webpack = require('webpack');
var plugins = [
function() {
this.plugin("done", function(stats) {
if (stats.compilation.errors && stats.compilation.errors.length && process.argv.indexOf('--watch') === -1) {
process.on('beforeExit', function() {
process.exit(1);
});
}
});
}
]
2015-04-29 17:11:52 -04:00
var externals = [{
"bluebird": {
root: "Promise",
commonjs2: "bluebird",
commonjs: "bluebird",
amd: "bluebird"
},
"lodash": {
root: "_",
commonjs2: "lodash",
commonjs: "lodash",
amd: "lodash"
}
}]
module.exports = {
output: {
library: 'Knex',
libraryTarget: 'umd'
},
module: {
loaders: [{
test: /\.json$/, loader: 'json-loader'
}]
},
2015-04-29 17:11:52 -04:00
externals: externals,
plugins: plugins
};