MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / commonjs

Function commonjs

packages/tooling/src/vite.ts:267–281  ·  view source on GitHub ↗
(config: UserConfig, projectDir: string, name: string, entry: string)

Source from the content-addressed store, hash-verified

265}
266
267export 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
283export interface EsmOptions {
284 withMin?: boolean;

Callers 1

Calls 2

resolveMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected