Add wasm-beep example
This commit is contained in:
parent
cf4e6ca5bf
commit
9dc0c04c95
10 changed files with 6938 additions and 0 deletions
29
examples/wasm-beep/webpack.config.js
Normal file
29
examples/wasm-beep/webpack.config.js
Normal 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"
|
||||
}),
|
||||
]
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue