mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 13:51:13 +00:00
Add simple rust wasm test
Needs an initial "npm install" and then "npm start" will build and launch it in the browser.
This commit is contained in:
parent
6110e4952d
commit
e313f39490
8 changed files with 118 additions and 0 deletions
28
examples/rustwasmtest/webpack.config.js
Normal file
28
examples/rustwasmtest/webpack.config.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
const path = require("path");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
|
||||
|
||||
const dist = path.resolve(__dirname, "dist");
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
entry: {
|
||||
index: "./js/index.js"
|
||||
},
|
||||
output: {
|
||||
path: dist,
|
||||
filename: "[name].js"
|
||||
},
|
||||
devServer: {
|
||||
contentBase: dist,
|
||||
},
|
||||
plugins: [
|
||||
new CopyPlugin([
|
||||
path.resolve(__dirname, "static")
|
||||
]),
|
||||
|
||||
new WasmPackPlugin({
|
||||
crateDirectory: __dirname,
|
||||
}),
|
||||
]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue