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