mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 17:46:56 +03:00
37 lines
806 B
TypeScript
37 lines
806 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)$/,
|
|
loaders: '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',
|
|
};
|