import type { RollupOptions } from 'rollup' import typescript from '@rollup/plugin-typescript' import alias from '@rollup/plugin-alias' const config: RollupOptions = { input: ['src/index.ts',], output: { dir: 'lib', format: 'esm', }, external: [ 'pixi.js', 'pixi-viewport', '@stomp/stompjs', 'mqtt', 'eventemitter3', '@pixi/graphics-extras' ], logLevel: 'debug', plugins: [ alias({ entries: [ { find: 'lib/global', replacement: 'lib/global.d.ts' }, ] }), typescript({ declaration: true, declarationDir: 'lib', include: ['src/**/*'], tsconfig: './tsconfig.json', }), ], } export default config