X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=frontend%2Findex.js;fp=frontend%2Findex.js;h=ebc5567016f54f970fa57feb12474b95c299420e;hb=642dd8a80ce2e1212b8e30c1edabb32bdb416cfc;hp=0000000000000000000000000000000000000000;hpb=d28e765e39e70ad2ab9a42885c786d5d8ba9ba40;p=recipes.git diff --git a/frontend/index.js b/frontend/index.js new file mode 100644 index 0000000..ebc5567 --- /dev/null +++ b/frontend/index.js @@ -0,0 +1,8 @@ +// Note that a dynamic `import` statement here is required due to +// webpack/webpack#6615, but in theory `import { greet } from './pkg';` +// will work here one day as well! +const rust = import('./pkg'); + +rust + .then(m => m.greet('Paul!')) + .catch(console.error); \ No newline at end of file