Files
old-spike/client/config/development/webpack.js
2016-02-23 00:54:10 -06:00

56 lines
1.2 KiB
JavaScript

import webpack from 'webpack';
const CLIENT = __dirname + '/../..';
const ROOT = CLIENT + '/..';
module.exports = {
entry: {
app: CLIENT + '/config/development/app',
style: CLIENT + '/config/development/style'
},
output: {
filename: '[name].js',
path: CLIENT + '/build/' + process.env.NODE_ENV
},
module: {
loaders: [
{
test: /\.scss$/,
loaders: ['style', 'raw', 'sass']
}, {
test: /\.css$/,
loaders: ['style', 'raw']
}, {
test: /\.js$/,
loader: 'babel'
}, {
test: /\.json$/,
loader: 'json'
}
]
},
sassLoader: {
includePaths: [CLIENT, ROOT + '/node_modules']
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
}),
new webpack.ProvidePlugin({
d3: "d3",
"window.d3": "d3"
})
],
node: {
fs: "empty"
},
resolve: {
alias: {
api: CLIENT + '/api/' + process.env.NODE_ENV,
config: CLIENT + '/config/' + process.env.NODE_ENV
}
}
}