Files
old-spike/client/config/development/webpack.js

56 lines
1.2 KiB
JavaScript
Raw Normal View History

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