(config: BuildConfig)
| 79 | |
| 80 | /** Load each of the qwik scripts to be inlined with esbuild "define" as const variables. */ |
| 81 | export async function inlineQwikScriptsEsBuild(config: BuildConfig) { |
| 82 | const variableToFileMap = [ |
| 83 | ['QWIK_LOADER_DEFAULT_MINIFIED', 'qwikloader.js'], |
| 84 | ['QWIK_LOADER_DEFAULT_DEBUG', 'qwikloader.debug.js'], |
| 85 | ]; |
| 86 | |
| 87 | const define: { [varName: string]: string } = {}; |
| 88 | |
| 89 | await Promise.all( |
| 90 | variableToFileMap.map(async (varToFile) => { |
| 91 | const varName = `globalThis.${varToFile[0]}`; |
| 92 | define[varName] = await getLoaderJsonString(config, varToFile[1]); |
| 93 | }) |
| 94 | ); |
| 95 | |
| 96 | return define; |
| 97 | } |
| 98 | |
| 99 | async function generateLoaderSubmodule(config: BuildConfig) { |
| 100 | const loaderDistDir = join(config.distQwikPkgDir, 'loader'); |
no test coverage detected
searching dependent graphs…