123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- const path = require('path')
- const HtmlWebPackPlugin = require("html-webpack-plugin");
- module.exports = {
- entry: ['./src/app/index.js'],
- output: {
- path: path.join(__dirname, 'dist/app'),
- filename: 'index.js',
- publicPath: '/',
- },
- module: {
- rules: [
- {
- test: /\.(js|jsx)$/,
- exclude: /node_modules/,
- use: {
- loader: "babel-loader",
- options: {
- presets: [
- "@babel/preset-env",
- "@babel/preset-react"
- ]
- }
- }
- },
- {
- test: /\.html$/,
- use: [
- {
- loader: "html-loader"
- }
- ]
- },
- {
- test: /\.css$/,
- use: [
- 'style-loader',
- 'css-loader'
- ],
- },
- ]
- },
- plugins: [
- new HtmlWebPackPlugin({
- template: "src/index.html"
- })
- ]
- };
|