mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 15:38:12 +08:00
Rearrange WASM code async import style
This commit is contained in:
@@ -19,6 +19,8 @@ html, body, #app {
|
|||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import MainWindow from "./components/window/MainWindow.vue";
|
import MainWindow from "./components/window/MainWindow.vue";
|
||||||
|
|
||||||
|
const wasm = import("../wasm/pkg");
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: { MainWindow },
|
components: { MainWindow },
|
||||||
created() {
|
created() {
|
||||||
@@ -26,7 +28,6 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async greet() {
|
async greet() {
|
||||||
const wasm = import("../wasm/pkg");
|
|
||||||
const { greet } = await wasm;
|
const { greet } = await wasm;
|
||||||
console.log(greet("Graphite"));
|
console.log(greet("Graphite"));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user