dat.gui/webpack/webpack.config.js

49 lines
886 B
JavaScript
Raw Normal View History

2015-08-14 16:30:03 +00:00
var path = require("path");
module.exports = {
2015-08-14 20:29:30 +00:00
target: 'web',
2015-08-14 16:30:03 +00:00
2015-08-14 20:29:30 +00:00
context: path.resolve(__dirname, '..', 'src'),
2015-08-14 16:30:03 +00:00
2015-08-14 20:29:30 +00:00
entry: {
main: '../index'
},
2015-08-14 16:30:03 +00:00
2015-08-14 20:29:30 +00:00
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel'
},
{
2015-08-14 22:35:31 +00:00
test: /\.js$/,
loader: 'eslint-loader',
exclude: /(node_modules|bower_components)/
2015-08-14 20:29:30 +00:00
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.png$/,
loader: 'url-loader?limit=100000'
},
{
2015-08-14 22:35:31 +00:00
test: /\.jpg$/,
loader: 'file-loader'
2015-08-14 20:29:30 +00:00
},
{
test: /\.scss$/,
loader: 'style!css!sass'
}
]
},
2015-08-14 16:30:03 +00:00
2015-08-14 20:29:30 +00:00
output: {
path: path.join(__dirname, '..', 'build'),
filename: 'dat.gui.js',
library: ['dat'],
libraryTarget: 'umd'
}
2015-08-14 16:30:03 +00:00
};