Skip to content
Snippets Groups Projects
webpack.config.prod.js 713 B
Newer Older
Louis's avatar
Louis committed
const { merge } = require("webpack-merge")
const common = require("./webpack.common.js")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const CopyPlugin = require("copy-webpack-plugin")

module.exports = merge(common, {
	mode: "production",
	plugins: [
		new HtmlWebpackPlugin({
			template: "./index.html",
		}),
		new CopyPlugin({
			patterns: [
				{ from: "static", to: "static" },
				{ from: "css", to: "css" },
				{ from: "js", to: "js" },
				{ from: "icon.svg", to: "icon.svg" },
				{ from: "favicon.ico", to: "favicon.ico" },
				{ from: "robots.txt", to: "robots.txt" },
				{ from: "icon.png", to: "icon.png" },
				{ from: "site.webmanifest", to: "site.webmanifest" },
			],
		}),
	],
})