Skip to content

Commit

Permalink
[Flight] Enable Server Action Source Maps in flight-esm Fixture (#30763)
Browse files Browse the repository at this point in the history
Stacked on #30758 and #30755.

This is copy paste from #30755 into the ESM package. We use the
`webpack-sources` package for the source map utility but it's not
actually dependent on Webpack itself. Could probably inline it in the
build.
  • Loading branch information
sebmarkbage authored Aug 22, 2024
1 parent e483df4 commit 97e2ce6
Show file tree
Hide file tree
Showing 4 changed files with 372 additions and 44 deletions.
5 changes: 3 additions & 2 deletions fixtures/flight-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
"prompts": "^2.4.2",
"react": "experimental",
"react-dom": "experimental",
"undici": "^5.20.0"
"undici": "^5.20.0",
"webpack-sources": "^3.2.0"
},
"scripts": {
"predev": "cp -r ../../build/oss-experimental/* ./node_modules/",
"prestart": "cp -r ../../build/oss-experimental/* ./node_modules/",
"dev": "concurrently \"npm run dev:region\" \"npm run dev:global\"",
"dev:global": "NODE_ENV=development BUILD_PATH=dist node server/global",
"dev:region": "NODE_ENV=development BUILD_PATH=dist nodemon --watch src --watch dist -- --experimental-loader ./loader/region.js --conditions=react-server server/region",
"dev:region": "NODE_ENV=development BUILD_PATH=dist nodemon --watch src --watch dist -- --enable-source-maps --experimental-loader ./loader/region.js --conditions=react-server server/region",
"start": "concurrently \"npm run start:region\" \"npm run start:global\"",
"start:global": "NODE_ENV=production node server/global",
"start:region": "NODE_ENV=production node --experimental-loader ./loader/region.js --conditions=react-server server/region"
Expand Down
5 changes: 5 additions & 0 deletions fixtures/flight-esm/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,11 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==

webpack-sources@^3.2.0:
version "3.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
Expand Down
3 changes: 2 additions & 1 deletion packages/react-server-dom-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"react-dom": "^19.0.0"
},
"dependencies": {
"acorn-loose": "^8.3.0"
"acorn-loose": "^8.3.0",
"webpack-sources": "^3.2.0"
}
}
Loading

0 comments on commit 97e2ce6

Please sign in to comment.