forked from js-data/js-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (33 loc) · 1.05 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var webpack = require('webpack');
var pkg = JSON.parse(require('fs').readFileSync('package.json'));
var banner = 'js-data\n' +
'@version ' + pkg.version + ' - Homepage <http://www.js-data.io/>\n' +
'@author Jason Dobry <[email protected]>\n' +
'@copyright (c) 2014-2015 Jason Dobry \n' +
'@license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>\n' +
'\n' +
'@overview Robust framework-agnostic data store.';
module.exports = {
debug: true,
entry: './src/index.js',
output: {
filename: './dist/js-data-debug.js',
libraryTarget: 'umd',
library: 'JSData'
},
module: {
loaders: [
{ test: /(src)(.+)\.js$/, exclude: /node_modules/, loader: 'babel-loader?blacklist=useStrict&modules=commonStrict' }
],
preLoaders: [
{
test: /(src)(.+)\.js$|(test)(.+)\.js$/, // include .js files
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader?failOnHint=true"
}
]
},
plugins: [
new webpack.BannerPlugin(banner)
]
};