2024-04-30 02:24:09 +08:00
|
|
|
import fs from 'fs/promises';
|
|
|
|
import path from 'path';
|
2024-06-13 15:56:43 +08:00
|
|
|
import { defineConfig } from '@tachybase/build';
|
2024-04-30 02:24:09 +08:00
|
|
|
|
|
|
|
const vditor = path.dirname(require.resolve('vditor'));
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
afterBuild: async (log) => {
|
|
|
|
log('coping vditor dist');
|
|
|
|
await fs.cp(vditor, path.resolve(__dirname, 'dist/client/vditor/dist'), {
|
|
|
|
recursive: true,
|
|
|
|
force: true,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|