graphic-pixi/rollup.config.ts

32 lines
684 B
TypeScript
Raw Normal View History

2023-12-12 15:29:52 +08:00
import type { RollupOptions } from 'rollup'
import typescript from '@rollup/plugin-typescript'
2023-12-13 16:01:53 +08:00
import alias from '@rollup/plugin-alias'
2023-12-12 15:29:52 +08:00
const config: RollupOptions = {
2023-12-13 15:30:16 +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: [
2023-12-13 13:29:51 +08:00
'pixi.js', 'pixi-viewport', '@stomp/stompjs', 'mqtt', 'eventemitter3', '@pixi/graphics-extras'
2023-12-12 17:31:07 +08:00
],
logLevel: 'debug',
2023-12-12 15:29:52 +08:00
plugins: [
2023-12-13 16:01:53 +08:00
alias({
entries: [
{ find: 'lib/global', replacement: 'lib/global.d.ts' },
]
}),
2023-12-12 15:29:52 +08:00
typescript({
2023-12-12 17:31:07 +08:00
declaration: true,
declarationDir: 'lib',
include: ['src/**/*'],
tsconfig: './tsconfig.json',
2023-12-13 16:01:53 +08:00
}),
2023-12-12 15:29:52 +08:00
],
}
export default config