Skip to content

Commit

Permalink
fix: prod-server support source-map (#5930)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiveMe-A-Name authored Jul 10, 2024
1 parent 380c4a3 commit 35cddd7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/fifty-bugs-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/prod-server': patch
---

fix: prod-server support source-map
fix: prod-server 支持 source-map
2 changes: 2 additions & 0 deletions packages/server/prod-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"dependencies": {
"@modern-js/server-core": "workspace:*",
"@modern-js/runtime-utils": "workspace:*",
"source-map-support": "0.5.21",
"@modern-js/utils": "workspace:*",
"@swc/helpers": "0.5.3"
},
Expand All @@ -57,6 +58,7 @@
"@scripts/build": "workspace:*",
"@modern-js/types": "workspace:*",
"@types/merge-deep": "^3.0.0",
"@types/source-map-support": "0.5.10",
"@types/node": "~16.11.7",
"husky": "^8.0.0",
"jest": "^29",
Expand Down
3 changes: 3 additions & 0 deletions packages/server/prod-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import {
loadServerEnv,
} from '@modern-js/server-core/node';
import { createServerBase } from '@modern-js/server-core';
import sourceMapSupport from 'source-map-support';
import { BaseEnv, ProdServerOptions } from './types';
import { applyPlugins } from './apply';

sourceMapSupport.install();

export { applyPlugins, type ApplyPlugins } from './apply';

export {
Expand Down
14 changes: 13 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 35cddd7

Please sign in to comment.