|
1 | | -const HtmlWebpackPlugin = require("html-webpack-plugin"); |
2 | | -const path = require("path"); |
3 | | -const webpack = require("webpack"); |
| 1 | +const HtmlWebpackPlugin = require('html-webpack-plugin'); |
| 2 | +const path = require('path'); |
| 3 | +const webpack = require('webpack'); |
4 | 4 |
|
5 | 5 | module.exports = { |
6 | | - entry: "./src/index.tsx", |
| 6 | + entry: './src/index.tsx', |
7 | 7 |
|
8 | | - module: { |
9 | | - rules: [ |
10 | | - { |
11 | | - test: /\.tsx?$/, |
12 | | - use: ["babel-loader"], |
13 | | - exclude: /node_modules/, |
14 | | - }, |
15 | | - ], |
16 | | - }, |
| 8 | + module: { |
| 9 | + rules: [ |
| 10 | + { |
| 11 | + test: /\.tsx?$/, |
| 12 | + use: ['babel-loader'], |
| 13 | + exclude: /node_modules/, |
| 14 | + }, |
| 15 | + ], |
| 16 | + }, |
17 | 17 |
|
18 | | - plugins: [ |
19 | | - new HtmlWebpackPlugin({ |
20 | | - template: "public/index.html", |
21 | | - }), |
22 | | - new webpack.ProvidePlugin({ |
23 | | - React: "react", |
24 | | - }), |
25 | | - ], |
| 18 | + plugins: [ |
| 19 | + new HtmlWebpackPlugin({ |
| 20 | + template: 'public/index.html', |
| 21 | + }), |
| 22 | + new webpack.ProvidePlugin({ |
| 23 | + React: 'react', |
| 24 | + }), |
| 25 | + ], |
26 | 26 |
|
27 | | - resolve: { |
28 | | - alias: { |
29 | | - "@": path.resolve(__dirname, "../src/"), |
| 27 | + resolve: { |
| 28 | + alias: { |
| 29 | + '@': path.resolve(__dirname, '../src/'), |
| 30 | + }, |
| 31 | + extensions: ['.js', '.jsx', '.ts', '.tsx', '.css', '.json'], |
30 | 32 | }, |
31 | | - extensions: [".js", ".jsx", ".ts", ".tsx", ".css", ".json"], |
32 | | - }, |
33 | 33 |
|
34 | | - output: { |
35 | | - filename: "bundle.js", |
36 | | - path: path.join(__dirname, "dist"), |
37 | | - }, |
| 34 | + output: { |
| 35 | + filename: 'bundle.js', |
| 36 | + path: path.join(__dirname, 'dist'), |
| 37 | + }, |
38 | 38 | }; |
0 commit comments