spee.ch/webpack.config.js

33 lines
609 B
JavaScript
Raw Normal View History

2018-01-18 00:00:03 +01:00
const Path = require('path');
const REACT_ROOT = Path.resolve(__dirname, 'react/');
module.exports = {
2018-01-18 18:33:26 +01:00
entry : './react/app.js',
output: {
2018-01-18 00:00:03 +01:00
path : Path.join(__dirname, '/public/bundle/'),
filename: 'bundle.js',
},
watch : true,
module: {
loaders: [
{
test : /.jsx?$/,
loader : 'babel-loader',
exclude: /node_modules/,
query : {
presets: ['es2015', 'react'],
},
},
],
},
2018-01-18 00:00:03 +01:00
resolve: {
modules: [
REACT_ROOT,
'node_modules',
__dirname,
],
extensions: ['.js', '.jsx', '.scss'],
},
};