loadable-components/example/webpack.config.js
Greg Bergé 601bd3442c feat: stable version 1
- Add a new `render` method to use render props pattern
- Fix all issues with SSR

BREAKING CHANGE: loadable-components/babel is now required if you do server side rendering.
BREAKING CHANGE: ErrorComponent now receive `ownProps` instead of `props`.
2018-02-02 15:24:21 +01:00

50 lines
1.0 KiB
JavaScript

const path = require('path')
module.exports = {
entry: './client.js',
output: {
path: path.resolve(__dirname, 'public'),
filename: 'bundle.js',
chunkFilename: '[name].bundle.js',
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
options: {
babelrc: false,
presets: [
'react',
[
'env',
{
targets: {
browsers: ['last 2 chrome versions'],
},
modules: false
},
],
],
plugins: [
'loadable-components/babel',
['transform-class-properties', { loose: true }],
'transform-object-rest-spread',
],
},
},
],
},
devtool: 'sourcemap',
devServer: {
proxy: {
contentBase: path.resolve(__dirname, 'public'),
publicPath: '/',
'/': {
target: 'http://localhost:3000',
},
},
},
}