const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CopyWebpackPlugin = require("copy-webpack-plugin"); module.exports = { mode: "development", entry: { index: "./src/index.js", }, resolve: { alias: { PhaserClasses: path.resolve(__dirname, "src/phaserClasses/"), Components: path.resolve(__dirname, "src/components/"), Entities: path.resolve(__dirname, "src/entities/"), Scenes: path.resolve(__dirname, "src/scenes/"), Scripts: path.resolve(__dirname, "src/scripts/"), Styles: path.resolve(__dirname, "src/styles/"), Systems: path.resolve(__dirname, "src/systems/"), }, }, devtool: "inline-source-map", devServer: { static: "./public", headers: { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "OPTIONS, POST, GET", }, }, plugins: [ new CopyWebpackPlugin({ patterns: [{ from: "public", to: "." }], }), new HtmlWebpackPlugin({ title: "Game Server", meta: { language: { httpEquiv: "Content-Language", content: "en_US", }, viewport: { key: "viewport", content: "initial-scale=1, width=device-width", }, }, templateContent: ({ htmlWebpackPlugin }) => `
${htmlWebpackPlugin.tags.headTags}