mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-25 02:53:53 +03:00
47 lines
1.0 KiB
TypeScript
47 lines
1.0 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/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',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||
|
},
|
||
|
};
|