const path = require('path') var htmlWebpackPlugin = require('html-webpack-plugin') var HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin') var MiniCssExtractPlugin = require('mini-css-extract-plugin') var CopyWebpackPlugin = require('copy-webpack-plugin') module.exports = { mode: 'development', context: __dirname, entry: './desktop/js/jquery.min.js', output: { path: path.resolve(__dirname, 'dist/desktop'), filename: 'js/[name]-[hash].js', publicPath: './', }, module: { rules: [ { test: /\.html$/i, loader: 'html-loader', }, { test: /\.css$/i, use: ['style-loader', MiniCssExtractPlugin.loader, 'css-loader'], }, ], }, plugins: [ new htmlWebpackPlugin({ filename: 'index.html', template: './desktop/index.html', title: 'CEBG: CRYPTO ELITE‘S BATTLEGROUNDS', }), new htmlWebpackPlugin({ filename: 'NFT.html', template: './desktop/NFT.html', title: 'NFT | CEBG: CRYPTO ELITE‘S BATTLEGROUNDS', }), // new CopyWebpackPlugin({ // patterns: [ // { from: './desktop/css', to: 'css/[name].[contenthash][ext]' }, // { from: './desktop/img', to: 'img/[name].[contenthash][ext]' }, // { from: './desktop/font', to: 'font[name].[contenthash][ext]' }, // ], // }), // new HtmlWebpackTagsPlugin({ tags: ['main.js', 'base.css'], append: true }), new MiniCssExtractPlugin({ filename: 'base.css' }), ], }