Use a separate pkg subdirectory for wasm-pack output
This commit is contained in:
parent
ae8dbbe41d
commit
011a4f0361
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
# Generated assets
|
# Generated assets
|
||||||
ui/static/css/stoptime.css
|
ui/static/css/stoptime.css
|
||||||
ui/static/stoptime_ui.*
|
ui/static/pkg
|
||||||
|
|
|
@ -21,7 +21,7 @@ category = "Build"
|
||||||
description = "Runs the Rust compiler via wasm-pack for the UI."
|
description = "Runs the Rust compiler via wasm-pack for the UI."
|
||||||
install-crate = "wasm-pack"
|
install-crate = "wasm-pack"
|
||||||
command = "wasm-pack"
|
command = "wasm-pack"
|
||||||
args = ["build", "--out-name", "stoptime_ui", "--out-dir", "static", "--target", "web"]
|
args = ["build", "--out-name", "stoptime_ui", "--out-dir", "static/pkg", "--target", "web", "--dev", "--no-typescript"]
|
||||||
cwd = "ui"
|
cwd = "ui"
|
||||||
|
|
||||||
[tasks.run]
|
[tasks.run]
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<!-- Load the UI via WASM -->
|
<!-- Load the UI via WASM -->
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import init from "./stoptime_ui.js"
|
import init from "./pkg/stoptime_ui.js"
|
||||||
init()
|
init()
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue