redux-devtools/packages/d3-state-visualizer/examples/tree/webpack.config.ts
Nathan Bierema 97ca2fc781
chore(*): move devDependencies back to packages (#870)
* Start work

* More work

* More work

* Prettify

* Fix

* More work

* Fix

* Cleanup
2021-09-18 23:47:03 +00:00

37 lines
805 B
TypeScript

import * as path from 'path';
import * as webpack from 'webpack';
export default {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/',
},
module: {
rules: [
{
test: /\.(js|ts)$/,
loader: 'babel-loader',
exclude: /node_modules/,
include: __dirname,
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
plugins: [new webpack.HotModuleReplacementPlugin()],
devServer: {
historyApiFallback: true,
hot: true,
port: 3000,
},
devtool: 'eval-source-map',
};