nocobase/packages/plugins/@nocobase/plugin-field-markdown-vditor/build.config.ts
Sun668 0d9b43206c
feat: load vditor dep from local (#4190)
* feat: load vditor dep from local

* fix: plugin-field-markdown-vditor build config

* Revert "fix: plugin-field-markdown-vditor build config"

This reverts commit 60d344d340.

* feat: plugin-field-markdown-vditor: use NODE_ENV

* fix: plugin-field-markdown-vdtor dep preload

* fix: plugin-field-markdown-vdtor dep preload

* fix: plugin-field-markdown-vdtor dep preload

* feat: plugin-field-markdown-vditor set default valut for edit

* fix: cdn

* fix: set vditor editor value after create

* fix: cdn

---------

Co-authored-by: chenos <chenlinxh@gmail.com>
2024-04-28 11:23:14 +08:00

16 lines
390 B
TypeScript

import { defineConfig } from '@nocobase/build';
import fs from 'fs/promises';
import path from 'path';
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,
});
},
});