Skip to content

Commit

Permalink
chore: add internal directory to server plugin context (#6108)
Browse files Browse the repository at this point in the history
  • Loading branch information
zllkjc authored Aug 28, 2024
1 parent 4053034 commit 610554c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/short-rocks-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/app-tools': patch
'@modern-js/server-core': patch
---

chore: add internal directory to server plugin context
chore: 在 server 插件上下文中增加 internal 目录
1 change: 1 addition & 0 deletions packages/server/core/src/serverBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export type ServerBaseOptions = {
metaName?: string;
routes?: ServerRoute[];
appContext: {
internalDirectory?: string;
appDirectory?: string;
sharedDirectory?: string;
apiDirectory?: string;
Expand Down
1 change: 1 addition & 0 deletions packages/solutions/app-tools/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const dev = async (
},
appContext: {
appDirectory,
internalDirecory: appContext.internalDirectory,
apiDirectory: appContext.apiDirectory,
lambdaDirectory: appContext.lambdaDirectory,
sharedDirectory: appContext.sharedDirectory,
Expand Down
2 changes: 2 additions & 0 deletions packages/solutions/app-tools/src/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const start = async (api: PluginAPI<AppTools<'shared'>>) => {
const {
distDirectory,
appDirectory,
internalDirectory,
port,
metaName,
serverRoutes,
Expand Down Expand Up @@ -65,6 +66,7 @@ export const start = async (api: PluginAPI<AppTools<'shared'>>) => {
serverConfigPath,
appContext: {
appDirectory,
internalDirectory,
sharedDirectory: getTargetDir(
appContext.sharedDirectory,
appContext.appDirectory,
Expand Down

0 comments on commit 610554c

Please sign in to comment.