mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-14 21:56:55 +03:00
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import * as path from 'path';
|
|
import * as webpack from 'webpack';
|
|
|
|
module.exports = {
|
|
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',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|ts)x?$/,
|
|
use: ['babel-loader'],
|
|
exclude: /node_modules/,
|
|
include: __dirname,
|
|
},
|
|
{
|
|
test: /\.css?$/,
|
|
use: [
|
|
'style-loader',
|
|
{
|
|
loader: 'raw-loader',
|
|
options: {
|
|
esModule: false,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
},
|
|
plugins: [new webpack.HotModuleReplacementPlugin()],
|
|
devServer: {
|
|
contentBase: path.join(__dirname, 'dist'),
|
|
host: 'localhost',
|
|
port: process.env.PORT || 3000,
|
|
historyApiFallback: true,
|
|
hot: true,
|
|
},
|
|
devtool: 'eval-source-map',
|
|
};
|