redux-devtools/packages/d3-state-visualizer/examples/tree/webpack.config.ts
Nathan Bierema 09c82b70ab
chore(react-dock): fix example build (#886)
* chore(react-dock): fix demo build

* Lint
2021-09-22 02:57:17 +00:00

44 lines
925 B
TypeScript

import * as path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
export default {
mode: 'development',
entry: './src/index.ts',
devtool: 'eval-source-map',
devServer: {
static: './dist',
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
}),
new ForkTsCheckerWebpackPlugin(),
],
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'dist'),
clean: true,
},
module: {
rules: [
{
test: /\.(js|ts)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', { targets: 'defaults' }],
'@babel/preset-typescript',
],
},
},
},
],
},
resolve: {
extensions: ['.js', '.ts'],
},
};