Skip to content

Commit

Permalink
fix: extension for dynamic import
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianCataldo committed Dec 29, 2022
1 parent 215c658 commit 8e9931c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/nannou-2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ edition = "2018"
resolver = "2"

[[bin]]
name = "nannou_web_compat_2"
name = "nannou_web_compat"
path = "src/main.rs"

[lib]
name = "nannou_web_test_2"
name = "nannou_web_test"
path = "src/lib.rs"
crate-type = ["cdylib"]

Expand Down
4 changes: 2 additions & 2 deletions crates/nannou-3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ edition = "2018"
resolver = "2"

[[bin]]
name = "nannou_web_compat_2"
name = "nannou_web_compat"
path = "src/main.rs"

[lib]
name = "nannou_web_test_2"
name = "nannou_web_test"
path = "src/lib.rs"
crate-type = ["cdylib"]

Expand Down
2 changes: 1 addition & 1 deletion crates/nannou-3/src/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct Model;

fn update(_app: &App, _model: &mut Model, _update: Update) {}

fn view(app: &App, model: &Model, frame: Frame) {
fn view(app: &App, _model: &Model, frame: Frame) {
let draw = app.draw();
let r = app.window_rect();
draw.background().color(BLACK);
Expand Down
4 changes: 2 additions & 2 deletions crates/nannou-4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ edition = "2018"
resolver = "2"

[[bin]]
name = "nannou_web_compat_2"
name = "nannou_web_compat"
path = "src/main.rs"

[lib]
name = "nannou_web_test_2"
name = "nannou_web_test"
path = "src/lib.rs"
crate-type = ["cdylib"]

Expand Down
4 changes: 2 additions & 2 deletions crates/nannou-5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ edition = "2018"
resolver = "2"

[[bin]]
name = "nannou_web_compat_2"
name = "nannou_web_compat"
path = "src/main.rs"

[lib]
name = "nannou_web_test_2"
name = "nannou_web_test"
path = "src/lib.rs"
crate-type = ["cdylib"]

Expand Down
4 changes: 2 additions & 2 deletions crates/nannou-6/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ edition = "2018"
resolver = "2"

[[bin]]
name = "nannou_web_compat_2"
name = "nannou_web_compat"
path = "src/main.rs"

[lib]
name = "nannou_web_test_2"
name = "nannou_web_test"
path = "src/lib.rs"
crate-type = ["cdylib"]

Expand Down
2 changes: 1 addition & 1 deletion src/pages/nannou-embed.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

const id = params.get('id') ?? 1;

await import(`../../crates/nannou-${id}/pkg`).then(
await import(`../../crates/nannou-${id}/pkg/nannou_web_test.js`).then(
async ({ default: nannou }) => {
await nannou().then((s) => {
s.main_web();
Expand Down

0 comments on commit 8e9931c

Please sign in to comment.