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::*; use crate::counters::*;
#[wasm_bindgen] #[wasm_bindgen]
pub fn main() { pub fn hydrate() {
console_error_panic_hook::set_once(); console_error_panic_hook::set_once();
_ = console_log::init_with_level(log::Level::Debug); _ = console_log::init_with_level(log::Level::Debug);
console_error_panic_hook::set_once(); console_error_panic_hook::set_once();

View file

@ -28,7 +28,7 @@ cfg_if! {
<body> <body>
{} {}
</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>"#, </html>"#,
run_scope({ run_scope({
move |cx| { move |cx| {