| 1234567891011121314151617181920212223242526272829303132 |
- const HtmlWebPackPlugin = require("html-webpack-plugin");
- const path = require('path');
- const htmlPlugin = new HtmlWebPackPlugin({
- title: "Production",
- template: "src/index.html"
- });
- module.exports = {
- entry: {
- app: './src/index.js',
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- exclude: /node_modules/,
- use: {
- loader: "babel-loader"
- }
- }, {
- test: /\.css$/,
- use: ["style-loader", "css-loader"]
- }
- ]
- },
- plugins: [htmlPlugin],
- output: {
- filename: '[name].bundle.js',
- path: path.resolve(__dirname, 'dist'),
- clean: true
- }
- };
|