Add wasm-beep example

This commit is contained in:
Tatsuyuki Ishi 2020-03-01 10:59:48 +09:00 • committed by mitchmindtree
parent cf4e6ca5bf
commit 9dc0c04c95
10 changed files with 6938 additions and 0 deletions

View file

@ -0,0 +1,29 @@
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const dist = path.resolve(__dirname, "dist");
module.exports = {
mode: "production",
entry: {
index: "./index.js"
},
output: {
path: dist,
filename: "[name].js"
},
devServer: {
contentBase: dist,
},
plugins: [
new HtmlWebpackPlugin({
template: 'index.html'
}),
new WasmPackPlugin({
crateDirectory: __dirname,
extraArgs: "--out-name index"
}),
]
};