redux-devtools/packages/redux-devtools-slider-monitor/examples/todomvc/webpack.config.js

47 lines
997 B
JavaScript
Raw Normal View History

const path = require('path');
const webpack = require('webpack');
module.exports = {
2020-08-01 22:30:39 +03:00
devtool: 'eval-source-map',
devServer: {
contentBase: path.join(__dirname, 'dist'),
host: 'localhost',
port: process.env.PORT || 3000,
historyApiFallback: true,
hot: true
},
entry: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
},
plugins: [new webpack.HotModuleReplacementPlugin()],
module: {
rules: [
{
test: /\.js$/,
use: ['babel-loader'],
exclude: /node_modules/,
include: [__dirname, path.join(__dirname, '../../src')]
},
{
test: /\.css?$/,
use: [
'style-loader',
{
loader: 'raw-loader',
options: {
esModule: false
}
}
]
}
]
}
};