Use a separate pkg subdirectory for wasm-pack output

This commit is contained in:
Paul van Tilburg 2020-07-16 14:40:49 +02:00
parent ae8dbbe41d
commit 011a4f0361
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
3 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -4,4 +4,4 @@
# Generated assets
ui/static/css/stoptime.css
ui/static/stoptime_ui.*
ui/static/pkg

View File

@ -21,7 +21,7 @@ category = "Build"
description = "Runs the Rust compiler via wasm-pack for the UI."
install-crate = "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"
[tasks.run]

View File

@ -11,7 +11,7 @@
<!-- Load the UI via WASM -->
<script type="module">
import init from "./stoptime_ui.js"
import init from "./pkg/stoptime_ui.js"
init()
</script>
</head>