diff --git a/packages/plugin-client/src/server.ts b/packages/plugin-client/src/server.ts index 31467d18b..91336d2ca 100644 --- a/packages/plugin-client/src/server.ts +++ b/packages/plugin-client/src/server.ts @@ -40,6 +40,9 @@ export default { }); const app = this.app; this.app.on('db.init', async () => { + if (this.options.importDemo !== true) { + return; + } const transaction = await app.db.sequelize.transaction(); const sqls = getInitSqls(); try { diff --git a/packages/plugin-multi-apps/src/server.ts b/packages/plugin-multi-apps/src/server.ts index 0cb37b77b..32dd802ac 100644 --- a/packages/plugin-multi-apps/src/server.ts +++ b/packages/plugin-multi-apps/src/server.ts @@ -73,6 +73,7 @@ function createApp(opts) { app.plugin( require(`@nocobase/plugin-client/${__filename.endsWith('.ts') ? 'src' : 'lib'}/server`).default, { dist: path.resolve(process.cwd(), './dist'), + importDemo: true, }); return app;