-
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 (#75) * Switch to `wasm-pack build --target bundler` and Vite plugins for loading 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) * Fix package-lock.json not matching up * Mention updated port for dev-environment with newer Vite * Fix release builds by pinning @swc/core to 1.6.* Apparently @swc/core 1.7.0 (recently released) has a regression that breaks vite-plugin-top-level-await: Menci/vite-plugin-top-level-await#52 * Commit difference between package-lock.json generated by NPM 10 in Docker environment vs NPM 9 locally --------- Co-authored-by: Eric Zhang <[email protected]>
- Loading branch information
Showing
6 changed files
with
294 additions
and
18 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") | ||
); |
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