Hi. is it possible to load component from script tag ? I am building nw.js app on client side & using nuxt on server side. This app needs to load compiled v8 snapshot within xhr response using nw.Window.get().evalNwBin(). In regular html it looks like this:
<html>
<head></head>
<body>
<script>
var url = "/myComponent.bin";
var xhr = new XMLHttpRequest();
xhr.responseType = 'arraybuffer'; // make response as ArrayBuffer
xhr.open('GET', url, true);
xhr.send();
xhr.onload = () => {
// xhr.response contains compiled JavaScript as ArrayBuffer
nw.Window.get().evalNWBin(null, xhr.response);
}
</script>
</body>
</html>
or is it possible to use component that loads like:
<script type="text/javascript" src="/mycomponent.js"></script>
Thanks.
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c973">#c973</a>)</em></sub></div>