-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to
wasm-pack build --target bundler
and Vite plugins for loa…
…ding WebAssembly component Fixes dev-mode. This makes use of native Vite capabilities to load the WebAssembly component and appears to be the recommended approach nowadays. See: rustwasm/wasm-pack#1106 (comment)
- Loading branch information
Showing
6 changed files
with
292 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import { StrictMode } from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { ChakraProvider } from "@chakra-ui/react"; | ||
import init, { set_panic_hook } from "rustpad-wasm"; | ||
import * as wasm from "rustpad-wasm"; | ||
import App from "./App"; | ||
import "./index.css"; | ||
|
||
init().then(() => { | ||
set_panic_hook(); | ||
ReactDOM.render( | ||
<StrictMode> | ||
<ChakraProvider> | ||
<App /> | ||
</ChakraProvider> | ||
</StrictMode>, | ||
document.getElementById("root") | ||
); | ||
}); | ||
ReactDOM.render( | ||
<StrictMode> | ||
<ChakraProvider> | ||
<App /> | ||
</ChakraProvider> | ||
</StrictMode>, | ||
document.getElementById("root") | ||
); |
Oops, something went wrong.