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

57 lines
1.2 KiB
JavaScript
Raw Normal View History

const path = require('path');
const webpack = require('webpack');
module.exports = {
devtool: 'eval-cheap-module-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'
},
2019-01-10 21:51:14 +03:00
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
resolve: {
alias: {
2019-01-10 21:51:14 +03:00
'redux-slider-monitor': path.join(
__dirname,
'..',
'..',
'src/SliderMonitor'
)
},
extensions: ['.js']
},
module: {
rules: [
{
test: /\.js$/,
use: ['babel-loader'],
exclude: /node_modules/,
include: [__dirname, path.join(__dirname, '../../src')]
},
{
test: /\.css?$/,
use: ['style-loader', 'raw-loader'],
include: [
__dirname,
path.join(__dirname, '../../../../node_modules/todomvc-app-css')
]
}
]
}
};