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
const myWorker = new Worker('https://gist.githack.com/pixelbucket-dev/b5da356d73f3620f2f18c010c8f7cb00/raw/6647655120b87219f1ab3029eef75d105551edb5/stencil-helper-transpile-worker.js'/* , { type: 'module' } */); | |
// auto inject the h import, to reduce boilerplate required in source | |
const h = "import { h } from 'https://cdn.skypack.dev/@stencil/core';\n"; | |
function addHToSources(sources) { | |
return sources.map(source => h + source); | |
} | |
export async function compileStencil(sources) { | |
if (!sources || !sources.length) { |