This repository was archived by the owner on Jul 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
76 lines (72 loc) · 2.32 KB
/
Copy pathwebpack.config.js
File metadata and controls
76 lines (72 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require('dotenv').config();
const { merge } = require('webpack-merge');
const common = require('./webpack/common.config');
const prod = require('./webpack/production.config');
const dev = require('./webpack/development.config');
const IS_DEVELOPMENT =
!process.env.NODE_ENV || process.env.NODE_ENV === 'development';
module.exports = IS_DEVELOPMENT ? merge([common, dev]) : merge([prod, common]);
// const path = require("path");
// const HtmlWebpackPlugin = require("html-webpack-plugin");
// const CopyPlugin = require("copy-webpack-plugin");
// module.exports = {
// entry: "./src/index.tsx",
// output: {
// path: path.join(__dirname, "build"),
// filename: "index.bundle.js",
// sourceMapFilename: "[name].js.map"
// },
// mode: process.env.NODE_ENV,
// resolve: {
// extensions: [".tsx", ".ts", ".js"],
// alias: {
// "src": path.resolve('./src')
// }
// },
// devServer: {
// static: path.join(__dirname, "build"),
// hot:true,
// port: 3000,
// historyApiFallback: true,
// },
// module: {
// rules: [
// {
// test: /\.(js|jsx)$/,
// exclude: /node_modules/,
// use: ["babel-loader"],
// },
// {
// test: /\.js$/,
// enforce: 'pre',
// use: ['source-map-loader'],
// },
// {
// test: /\.(ts|tsx)$/,
// exclude: /node_modules/,
// use: ["ts-loader"],
// },
// {
// test: /\.css$/,
// use: [ 'style-loader', 'css-loader' ]
// },
// {
// test: /\.(jpg|jpeg|png|gif|mp3|svg)$/,
// use: ["file-loader"],
// },
// ]
// },
// plugins: [
// new HtmlWebpackPlugin({
// template: path.join(__dirname, "public", "index.html"),
// }),
// new CopyPlugin({
// patterns: [
// {from: "public/favicon.ico", to: ""},
// {from: "public/logo192.png", to: ""},
// {from: "public/logo512.png", to: ""},
// {from: "public/manifest.json", to: ""},
// ]
// }),
// ],
// };