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

54 lines
1.2 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';
const ROOT = __dirname + '/../../../';
module.exports = {
entry: {
2016-02-22 20:02:45 -06:00
app: ROOT + 'client/config/app',
style: ROOT + 'client/config/style'
2016-02-22 14:36:07 -06:00
},
devtool: 'source-map',
output: {
2016-02-22 20:02:45 -06:00
filename: '[name].js',
path: ROOT + 'client/build/design/assets'
2016-02-22 14:36:07 -06:00
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "raw-loader!sass-loader")
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", "raw-loader")
}, {
test: /\.js$/,
loader: 'babel'
}
]
},
sassLoader: {
includePaths: [ROOT + 'client', ROOT + 'node_modules']
},
// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)
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"
})
],
node: {
fs: "empty"
2016-02-22 20:02:45 -06:00
},
resolve: {
alias: {
api: ROOT + 'client/api/design',
config: ROOT + 'client/config/design'
}
2016-02-22 14:36:07 -06:00
}
};