()
| 108 | * @returns an Esbuild plugin |
| 109 | */ |
| 110 | export function findAndReplaceLoadModule(): Plugin { |
| 111 | return { |
| 112 | name: 'findAndReplaceLoadModule', |
| 113 | setup(build) { |
| 114 | build.onEnd(async (result) => { |
| 115 | for (const file of result.outputFiles!) { |
| 116 | const { path, text } = file; |
| 117 | |
| 118 | await fs.writeFile(path, text.replace(/\${MODULE_IMPORT_PREFIX}/, './')); |
| 119 | } |
| 120 | }); |
| 121 | }, |
| 122 | }; |
| 123 | } |
| 124 | |
| 125 | async function copyPolyfills(opts: BuildOptions, outputInternalClientPolyfillsDir: string) { |
| 126 | const srcPolyfillsDir = join(opts.srcDir, 'client', 'polyfills'); |
no outgoing calls
no test coverage detected