<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">Trying to build an SSR application w/ vue-ssr while using the somewhat newly introduced module federation plugin in webpack 5 (<a href="https://webpack.js.org/concepts/module-federation/" rel="nofollow">https://webpack.js.org/concepts/module-federation/</a>) won't work currently. It does when focusing only on the client build but is not when trying to prerender. The webpack plugin is not working out of the box while building for node. In order to make this work, one can use a package from telenko (<a href="https://github.com/telenko/node-mf">https://github.com/telenko/node-mf</a>), which will hook into the process and allow for module federation to work in node. Nevertheless, due to the adjustments, namely relying on URL, vue-server-renderer will fail to build.</p>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">To make this work it basically only requires to add nodes URL to the sandboxed node environment.</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function createSandbox (context) {
  var sandbox = {
    Buffer: Buffer,
    URL: URL, // add URL
    console: console,
    process: process,
    setTimeout: setTimeout,
    setInterval: setInterval,
    setImmediate: setImmediate,
    clearTimeout: clearTimeout,
    clearInterval: clearInterval,
    clearImmediate: clearImmediate,
    __VUE_SSR_CONTEXT__: context
  };
  sandbox.global = sandbox;
  return sandbox
}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">createSandbox</span> <span class="pl-kos">(</span><span class="pl-s1">context</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">sandbox</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-c1">Buffer</span>: <span class="pl-v">Buffer</span><span class="pl-kos">,</span>
    <span class="pl-c1">URL</span>: <span class="pl-c1">URL</span><span class="pl-kos">,</span> <span class="pl-c">// add URL</span>
    <span class="pl-c1">console</span>: <span class="pl-smi">console</span><span class="pl-kos">,</span>
    <span class="pl-c1">process</span>: <span class="pl-s1">process</span><span class="pl-kos">,</span>
    <span class="pl-c1">setTimeout</span>: <span class="pl-s1">setTimeout</span><span class="pl-kos">,</span>
    <span class="pl-c1">setInterval</span>: <span class="pl-s1">setInterval</span><span class="pl-kos">,</span>
    <span class="pl-c1">setImmediate</span>: <span class="pl-s1">setImmediate</span><span class="pl-kos">,</span>
    <span class="pl-c1">clearTimeout</span>: <span class="pl-s1">clearTimeout</span><span class="pl-kos">,</span>
    <span class="pl-c1">clearInterval</span>: <span class="pl-s1">clearInterval</span><span class="pl-kos">,</span>
    <span class="pl-c1">clearImmediate</span>: <span class="pl-s1">clearImmediate</span><span class="pl-kos">,</span>
    <span class="pl-c1">__VUE_SSR_CONTEXT__</span>: <span class="pl-s1">context</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-s1">sandbox</span><span class="pl-kos">.</span><span class="pl-c1">global</span> <span class="pl-c1">=</span> <span class="pl-s1">sandbox</span><span class="pl-kos">;</span>
  <span class="pl-k">return</span> <span class="pl-s1">sandbox</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">What problem does this feature solve?</h3>
<p dir="auto">This feature removes boilerplate-ish code to forward events, making the coding experience feel more vue-ish.</p>
<p dir="auto">In a parent-child-grandchild scenario where the grandchild needs to pass information to the parent, it currently has to emit an event which is then captured by the child who forwards it to the parent.</p>
<p dir="auto">This feature would remove the need to write the function in the child that forwards the event from the grandchild to the parent.</p>
<p dir="auto">FYI: This has been implemented in Svelte:<br>
<a href="https://svelte.dev/tutorial/event-forwarding" rel="nofollow">https://svelte.dev/tutorial/event-forwarding</a></p>
<blockquote>
<p dir="auto">But that's a lot of code to write, so Svelte gives us an equivalent shorthand — an on:message event directive without a value means &gt;'forward all message events'.</p>
</blockquote>
<h3 dir="auto">What does the proposed API look like?</h3>
<p dir="auto">For Instance:</p>
<ul dir="auto">
<li>"[at]click.forward"</li>
<li>simply "[at]click"</li>
</ul>