Resolve ambiguous main import error

This commit is contained in:
Greg Johnston 2022-11-16 20:15:29 -05:00
parent 96238c553e
commit c17c6549cf
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ cfg_if! {
use crate::counters::*;
#[wasm_bindgen]
pub fn main() {
pub fn hydrate() {
console_error_panic_hook::set_once();
_ = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once();

View file

@ -28,7 +28,7 @@ cfg_if! {
<body>
{}
</body>
<script type="module">import init, {{ main }} from './pkg/leptos_counter_isomorphic.js'; init().then(main);</script>
<script type="module">import init, {{ hydrate }} from './pkg/leptos_counter_isomorphic.js'; init().then(hydrate);</script>
</html>"#,
run_scope({
move |cx| {