123456789101112131415161718192021222324252627282930313233 |
- const path = require("path");
- const HtmlWebpackPlugin = require('html-webpack-plugin')
-
- module.exports = {
- entry: "./src/index.js",
- output: {
- filename: "main.js",
- path: path.resolve(__dirname, "dist")
- },
- module: {
- rules: [
- {
- test: /\.(png|jpg|gif)$/,
- use: [
- {
- loader: 'file-loader',
- options: {},
- },
- ],
- },
- ],
- },
- plugins: [
- new HtmlWebpackPlugin({ template: "src/index.html" })
- ],
- devtool: "source-map",
- devServer: {
- watchOptions: {
- ignored: /node_modules/
- }
- }
- };
|