()
| 179 | } |
| 180 | |
| 181 | function writeTypesPlugin(): Plugin { |
| 182 | return { |
| 183 | name: 'write-types', |
| 184 | writeBundle() { |
| 185 | if (this.meta.watchMode) { |
| 186 | writeFileSync( |
| 187 | 'dist/node/index.d.ts', |
| 188 | "export * from '../../src/node/index.ts'", |
| 189 | ) |
| 190 | writeFileSync( |
| 191 | 'dist/node/module-runner.d.ts', |
| 192 | "export * from '../../src/module-runner/index.ts'", |
| 193 | ) |
| 194 | } |
| 195 | }, |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | function externalizeDepsInWatchPlugin(): Plugin { |
| 200 | return { |