mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-12-02 14:33:52 +03:00
38 lines
870 B
TypeScript
38 lines
870 B
TypeScript
import * as path from 'path';
|
|
import * as webpack from 'webpack';
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
module.exports = {
|
|
mode: isProduction ? 'production' : 'development',
|
|
entry: [
|
|
!isProduction && 'webpack-dev-server/client?http://localhost:3000',
|
|
!isProduction && 'webpack/hot/only-dev-server',
|
|
'./src/index',
|
|
].filter(Boolean),
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/static/',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|ts)x$/,
|
|
loader: 'babel-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
},
|
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
|
devServer: {
|
|
historyApiFallback: true,
|
|
hot: true,
|
|
port: 3000,
|
|
},
|
|
devtool: 'eval-source-map',
|
|
};
|