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

60 lines
1.3 KiB
JavaScript
Raw Normal View History

2016-02-22 14:36:07 -06:00
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import webpack from 'webpack';
2016-02-23 00:52:24 -06:00
const CLIENT = __dirname + '/../..';
const ROOT = CLIENT + '/..';
2016-02-22 14:36:07 -06:00
module.exports = {
entry: {
2016-02-23 00:52:24 -06:00
app: CLIENT + '/config/design/app',
style: CLIENT + '/config/design/style'
2016-02-22 14:36:07 -06:00
},
output: {
2016-02-22 20:02:45 -06:00
filename: '[name].js',
2016-02-23 00:52:24 -06:00
path: CLIENT + '/build/design/assets'
2016-02-22 14:36:07 -06:00
},
module: {
2016-02-23 00:52:24 -06:00
loaders: [
2016-02-22 14:36:07 -06:00
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "raw-loader!sass-loader")
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "raw-loader")
}, {
2016-02-23 00:52:24 -06:00
test: /\.js$/,
loader: 'babel'
}, {
test: /\.json$/,
loader: 'json'
}
]
2016-02-22 14:36:07 -06:00
},
sassLoader: {
2016-02-23 00:52:24 -06:00
includePaths: [CLIENT, ROOT + '/node_modules']
2016-02-22 14:36:07 -06:00
},
plugins: [
2016-02-22 20:02:45 -06:00
new ExtractTextPlugin("style.css", {
2016-02-22 14:36:07 -06:00
allChunks: true
}),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
2016-02-23 00:52:24 -06:00
}),
new webpack.ProvidePlugin({
d3: "d3",
"window.d3": "d3"
2016-02-22 14:36:07 -06:00
})
],
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
}
2016-02-23 00:52:24 -06:00
}