mirror of
https://github.com/morten-olsen/parcel.git
synced 2026-02-08 01:36:24 +01:00
cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Configuration } from 'webpack';
|
||||
import webpack, { Configuration } from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import path from 'path';
|
||||
|
||||
@@ -6,6 +6,7 @@ const config: Configuration = {
|
||||
mode: 'development',
|
||||
entry: {
|
||||
app: [
|
||||
'react-hot-loader/patch',
|
||||
path.join(__dirname, 'src', 'index.tsx'),
|
||||
],
|
||||
},
|
||||
@@ -14,16 +15,27 @@ const config: Configuration = {
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
alias: {
|
||||
'react-dom': '@hot-loader/react-dom',
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin(),
|
||||
],
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.tsx?/,
|
||||
test: /\.tsx?$/,
|
||||
use: ['babel-loader'],
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader'],
|
||||
}],
|
||||
},
|
||||
};
|
||||
|
||||
(config as any).devServer = {
|
||||
hot: true,
|
||||
contentBase: './dist',
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user