feat(core): 新增FEATURE_MODULES统一管理特性模块,优化模块引入方式
This commit is contained in:
@@ -4,6 +4,7 @@ import { ConfigModule, ConfigService } from '@nestjs/config';
|
|||||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||||
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
|
import { ThrottlerModule, ThrottlerGuard } from '@nestjs/throttler';
|
||||||
import databaseConfig from '@/config/database.config';
|
import databaseConfig from '@/config/database.config';
|
||||||
|
import { FEATURE_MODULES } from '@/feature-modules';
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -31,6 +32,7 @@ import databaseConfig from '@/config/database.config';
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
...FEATURE_MODULES,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
|
|||||||
1
src/feature-modules.ts
Normal file
1
src/feature-modules.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const FEATURE_MODULES = [];
|
||||||
Reference in New Issue
Block a user