moon-engine 0.1.1

A WebGL2/WASM Game Library written in the Rust programming language.
Documentation
const CopyPlugin = require("copy-webpack-plugin");
const path = require('path');

let config = {
  entry: "./bootstrap.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "bootstrap.js",
  },
  module: {
    rules: [
      {
        test: /\.wasm$/,
        type: 'webassembly/sync',
      }
    ]
  },
  experiments: {
    syncWebAssembly: true
  },
  mode: "development",
  plugins: [
    new CopyPlugin({
      patterns: [
        "index.html",
        "favicon.ico",
        { from: "texture", to: "texture" },
      ]
    }),
  ],
};

module.exports = (env, argv) => {
  if (argv.mode === "production") {
    config.mode = "production";
  }

  return config;
};