Introduces a plugin manager (OB11PluginMangerAdapter) for dynamic plugin loading, initialization, and event handling. Adds an example plugin with configuration files and updates related code to support plugin directory detection and loading. Refactors plugin adapter logic for extensibility and modularity.
31 lines
805 B
TypeScript
31 lines
805 B
TypeScript
import { defineConfig } from 'vite';
|
|
import { resolve } from 'path';
|
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
import { builtinModules } from 'module';
|
|
|
|
const nodeModules = [...builtinModules, builtinModules.map((m) => `node:${m}`)].flat();
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
conditions: ['node', 'default'],
|
|
alias: {
|
|
'@/core': resolve(__dirname, '../core'),
|
|
'@': resolve(__dirname, '../'),
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: false,
|
|
target: 'esnext',
|
|
minify: false,
|
|
lib: {
|
|
entry: 'index.ts',
|
|
formats: ['es'],
|
|
fileName: () => 'index.mjs',
|
|
},
|
|
rollupOptions: {
|
|
external: [...nodeModules],
|
|
},
|
|
},
|
|
plugins: [nodeResolve()],
|
|
});
|