(filter: RegExp, newModulePath: string)
| 158 | |
| 159 | /** Esbuild plugin to change an import path, but keep it an external path. */ |
| 160 | export function importPath(filter: RegExp, newModulePath: string) { |
| 161 | const plugin: Plugin = { |
| 162 | name: 'importPathPlugin', |
| 163 | setup(build) { |
| 164 | build.onResolve({ filter }, () => ({ |
| 165 | path: newModulePath, |
| 166 | external: true, |
| 167 | })); |
| 168 | }, |
| 169 | }; |
| 170 | return plugin; |
| 171 | } |
| 172 | |
| 173 | /** Standard license banner to place at the top of the generated files. */ |
| 174 | export const getBanner = (moduleName: string, version: string) => { |
no outgoing calls
no test coverage detected
searching dependent graphs…