storybook/lib/ui/example/webpack.config.js
Norbert de Langen 58b5d6d22f WIP
2017-08-16 21:58:17 +02:00

27 lines
661 B
JavaScript

const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
`${require.resolve('webpack-dev-server/client')}?http://localhost:9999`,
'./client/index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/',
},
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
loaders: [
{
test: /\.js$/,
loader: require.resolve('babel-loader'),
query: { presets: ['react', 'env', 'stage-0'] },
include: [path.join(__dirname, 'client'), path.resolve(__dirname, '../src')],
},
],
},
};