Open History to see the last commit
1const HtmlWebPackPlugin = require('html-webpack-plugin')
2β
3const htmlPlugin = new HtmlWebPackPlugin({
4 template: './public/index.html',
5 filename: './index.html',
6})
7β
8module.exports = {
9 entry: './src/index.tsx',
10 resolve: {
11 extensions: ['.tsx', '.ts', '.js'],
12 },
13 module: {
14 rules: [
15 {
16 test: /\.(?:js|mjs|cjs|jsx|ts|tsx)$/,
17 exclude: /node_modules/,
18 use: {
19 loader: 'babel-loader',
20 options: {
21 presets: [
22 '@babel/preset-env',
23 '@babel/preset-react',
24 '@babel/preset-typescript',
25 ],
26 },
27 },
28 },
29 ],
30 },
31 plugins: [htmlPlugin],
32}