spee.ch/webpack.client.common.js
2018-03-19 14:11:05 -07:00

32 lines
700 B
JavaScript

const Path = require('path');
const CLIENT_ROOT = Path.resolve(__dirname, 'client/');
module.exports = {
target: 'web',
entry : ['babel-polyfill', 'whatwg-fetch', './client/client.js'],
output: {
path : Path.join(__dirname, 'public/bundle/'),
publicPath: 'public/bundle/',
filename : 'bundle.js',
},
module: {
loaders: [
{
test : /.jsx?$/,
loader : 'babel-loader',
exclude: /node_modules/,
query : {
presets: ['es2015', 'react', 'stage-2'],
},
},
],
},
resolve: {
modules: [
CLIENT_ROOT,
'node_modules',
__dirname,
],
extensions: ['.js', '.jsx', '.scss'],
},
};