CoolFace
Apppublic

hoduy99/react-test

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
webpack.config.js37 linesDownload Raw Back to root
1const path = require('path');2const HtmlWebpackPlugin = require('html-webpack-plugin');3 4module.exports = {5  entry: './src/index.js',6  output: {7    path: path.resolve(__dirname, 'build'),8    filename: 'bundle.js',9  },10  module: {11    rules: [12      {13        test: /\.(js|jsx)$/,14        exclude: /node_modules/,15        use: {16          loader: 'babel-loader',17          options: {18            presets: ['@babel/preset-env', '@babel/preset-react']19          }20        },21      },22      {23        test: /\.css$/,24        use: ['style-loader', 'css-loader'],25      },26    ],27  },28  plugins: [29    new HtmlWebpackPlugin({30      template: './public/index.html',31    }),32  ],33  resolve: {34    extensions: ['.js', '.jsx'],35  },36};37