redux-devtools/packages/redux-devtools-inspector-monitor-test-tab/demo/webpack.config.ts
Nathan Bierema 6af7103e41
chore(test-tab): fix demo build (#891)
* stash

* stash
2021-09-25 04:54:14 +00:00

51 lines
1.1 KiB
TypeScript

import * as path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
import pkg from '@redux-devtools/inspector-monitor-test-tab/package.json';
module.exports = {
mode: 'development',
entry: './src/index.tsx',
devtool: 'eval-source-map',
devServer: {
static: './dist',
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
package: pkg,
}),
new ForkTsCheckerWebpackPlugin(),
],
output: {
filename: 'bundle.js',
path: path.join(__dirname, 'dist'),
clean: true,
},
module: {
rules: [
{
test: /\.(js|ts)x?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
['@babel/preset-env', { targets: 'defaults' }],
'@babel/preset-react',
'@babel/preset-typescript',
],
},
},
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
};