2023-12-12 15:29:52 +08:00
|
|
|
import type { RollupOptions } from 'rollup'
|
|
|
|
import typescript from '@rollup/plugin-typescript'
|
|
|
|
|
|
|
|
|
|
|
|
const config: RollupOptions = {
|
2023-12-12 17:31:07 +08:00
|
|
|
input: 'src/index.ts',
|
2023-12-12 15:29:52 +08:00
|
|
|
output: {
|
2023-12-12 17:31:07 +08:00
|
|
|
dir: 'lib',
|
|
|
|
format: 'esm',
|
2023-12-12 15:29:52 +08:00
|
|
|
},
|
2023-12-12 17:31:07 +08:00
|
|
|
external: [
|
|
|
|
'pixi.js', 'pixi-viewport', '@stomp/stompjs', 'mqtt', 'eventemitter3'
|
|
|
|
],
|
|
|
|
logLevel: 'debug',
|
2023-12-12 15:29:52 +08:00
|
|
|
plugins: [
|
|
|
|
typescript({
|
2023-12-12 17:31:07 +08:00
|
|
|
declaration: true,
|
|
|
|
declarationDir: 'lib',
|
|
|
|
include: ['src/**/*'],
|
|
|
|
tsconfig: './tsconfig.json',
|
2023-12-12 15:29:52 +08:00
|
|
|
})
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|