Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/sample-platformer. Sample Platformer built in Excalibur excaliburjs.com/sample-platformer
Something went wrong. Try again.
sample-platformer webpack.config.js
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758const path = require("path");const CopyPlugin = require("copy-webpack-plugin");
module.exports = { entry: "./src/main.ts", devtool: "source-map", experiments: { topLevelAwait: true, }, devServer: { port: 9000, allowedHosts: 'all', devMiddleware: { writeToDisk: true, }, static: { directory: path.resolve(__dirname), }, }, plugins: [ new CopyPlugin({ patterns: [ "index.html", { from: "./res/tilemap.png", to: "./tilemap.png" }, ], }), ], resolve: { extensions: [".ts", ".js"], }, output: { filename: "[name].js", sourceMapFilename: "[file].map", path: path.resolve(__dirname, "dist"), }, module: { rules: [ { test: /\.ts$/, use: "ts-loader", exclude: /node_modules/, }, { test: /\.(png|jpg|bmp|wav|mp3|tmx|tsx)$/, use: [ { loader: "file-loader", options: { emitFile: true, esModule: false, }, }, ], }, ], },};