(config: UserConfig, projectDir: string, name: string, entry: string)
| 265 | } |
| 266 | |
| 267 | export function commonjs(config: UserConfig, projectDir: string, name: string, entry: string) { |
| 268 | const lib = config.build!.lib! as LibraryOptions; |
| 269 | lib.entry = { |
| 270 | [name]: path.resolve(projectDir, entry) |
| 271 | }; |
| 272 | (config.build!.rollupOptions!.output as OutputOptions[]).push({ |
| 273 | globals: { |
| 274 | jQuery: 'jQuery' |
| 275 | }, |
| 276 | dir: 'dist/', |
| 277 | format: 'cjs', |
| 278 | name: name, |
| 279 | entryFileNames: '[name].cjs' |
| 280 | }); |
| 281 | } |
| 282 | |
| 283 | export interface EsmOptions { |
| 284 | withMin?: boolean; |
no test coverage detected