-
Notifications
You must be signed in to change notification settings - Fork 26.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turbopack: Fix server action sourcemaps #69884
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ijjk
added
created-by: Turbopack team
PRs by the Turbopack team.
tests
Turbopack
Related to Turbopack with Next.js.
labels
Sep 9, 2024
mischnic
changed the title
Turbopack dev: Add test for server actions errors in development
Turbopack: Fix fix server action sourcemaps
Sep 9, 2024
Tests Passed |
Stats from current PRDefault Build (Increase detected
|
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
buildDuration | 18.3s | 15.6s | N/A |
buildDurationCached | 8.7s | 7.4s | N/A |
nodeModulesSize | 353 MB | 353 MB | ✓ |
nextStartRea..uration (ms) | 427ms | 434ms | N/A |
Client Bundles (main, webpack)
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
1393.HASH.js gzip | 169 B | 169 B | ✓ |
4109-HASH.js gzip | 5.25 kB | 5.25 kB | N/A |
717-HASH.js gzip | 42.6 kB | 42.7 kB | N/A |
85b7d013-HASH.js gzip | 52 kB | 52 kB | ✓ |
framework-HASH.js gzip | 44.9 kB | 44.9 kB | ✓ |
main-app-HASH.js gzip | 224 B | 228 B | N/A |
main-HASH.js gzip | 32.6 kB | 32.6 kB | N/A |
webpack-HASH.js gzip | 1.71 kB | 1.71 kB | ✓ |
Overall change | 98.8 kB | 98.8 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
polyfills-HASH.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
_app-HASH.js gzip | 193 B | 193 B | ✓ |
_error-HASH.js gzip | 192 B | 192 B | ✓ |
amp-HASH.js gzip | 508 B | 512 B | N/A |
css-HASH.js gzip | 342 B | 343 B | N/A |
dynamic-HASH.js gzip | 1.84 kB | 1.84 kB | N/A |
edge-ssr-HASH.js gzip | 266 B | 266 B | ✓ |
head-HASH.js gzip | 364 B | 364 B | ✓ |
hooks-HASH.js gzip | 392 B | 392 B | ✓ |
image-HASH.js gzip | 4.4 kB | 4.4 kB | N/A |
index-HASH.js gzip | 268 B | 268 B | ✓ |
link-HASH.js gzip | 2.81 kB | 2.81 kB | ✓ |
routerDirect..HASH.js gzip | 328 B | 328 B | ✓ |
script-HASH.js gzip | 396 B | 397 B | N/A |
withRouter-HASH.js gzip | 323 B | 324 B | N/A |
1afbb74e6ecf..834.css gzip | 106 B | 106 B | ✓ |
Overall change | 4.92 kB | 4.92 kB | ✓ |
Client Build Manifests
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
_buildManifest.js gzip | 747 B | 750 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
index.html gzip | 521 B | 523 B | N/A |
link.html gzip | 536 B | 537 B | N/A |
withRouter.html gzip | 518 B | 519 B | N/A |
Overall change | 0 B | 0 B | ✓ |
Edge SSR bundle Size
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
edge-ssr.js gzip | 99.6 kB | 99.6 kB | N/A |
page.js gzip | 180 kB | 180 kB | N/A |
Overall change | 0 B | 0 B | ✓ |
Middleware size
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
middleware-b..fest.js gzip | 667 B | 673 B | N/A |
middleware-r..fest.js gzip | 155 B | 156 B | N/A |
middleware.js gzip | 29.9 kB | 29.9 kB | N/A |
edge-runtime..pack.js gzip | 844 B | 844 B | ✓ |
Overall change | 844 B | 844 B | ✓ |
Next Runtimes
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
973-experime...dev.js gzip | 322 B | 322 B | ✓ |
973.runtime.dev.js gzip | 314 B | 314 B | ✓ |
app-page-exp...dev.js gzip | 317 kB | 317 kB | ✓ |
app-page-exp..prod.js gzip | 125 kB | 125 kB | ✓ |
app-page-tur..prod.js gzip | 139 kB | 139 kB | ✓ |
app-page-tur..prod.js gzip | 134 kB | 134 kB | ✓ |
app-page.run...dev.js gzip | 305 kB | 305 kB | ✓ |
app-page.run..prod.js gzip | 121 kB | 121 kB | ✓ |
app-route-ex...dev.js gzip | 31.2 kB | 31.2 kB | ✓ |
app-route-ex..prod.js gzip | 21.1 kB | 21.1 kB | ✓ |
app-route-tu..prod.js gzip | 21.1 kB | 21.1 kB | ✓ |
app-route-tu..prod.js gzip | 20.9 kB | 20.9 kB | ✓ |
app-route.ru...dev.js gzip | 32.9 kB | 32.9 kB | ✓ |
app-route.ru..prod.js gzip | 20.9 kB | 20.9 kB | ✓ |
pages-api-tu..prod.js gzip | 9.62 kB | 9.62 kB | ✓ |
pages-api.ru...dev.js gzip | 11.5 kB | 11.5 kB | ✓ |
pages-api.ru..prod.js gzip | 9.61 kB | 9.61 kB | ✓ |
pages-turbo...prod.js gzip | 20.8 kB | 20.8 kB | ✓ |
pages.runtim...dev.js gzip | 26.4 kB | 26.4 kB | ✓ |
pages.runtim..prod.js gzip | 20.8 kB | 20.8 kB | ✓ |
server.runti..prod.js gzip | 57.7 kB | 57.7 kB | ✓ |
Overall change | 1.45 MB | 1.45 MB | ✓ |
build cache Overall increase ⚠️
vercel/next.js canary | vercel/next.js mischnic/server-actions-sourcemap | Change | |
---|---|---|---|
0.pack gzip | 1.6 MB | 1.61 MB | |
index.pack gzip | 128 kB | 129 kB | N/A |
Overall change | 1.6 MB | 1.61 MB |
Diff details
Diff for dynamic-HASH.js
@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[2739],
{
- /***/ 8174: /***/ (
+ /***/ 848: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/dynamic",
function () {
- return __webpack_require__(5519);
+ return __webpack_require__(2736);
},
]);
if (false) {
@@ -18,7 +18,7 @@
/***/
},
- /***/ 5600: /***/ (module, exports, __webpack_require__) => {
+ /***/ 9565: /***/ (module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", {
@@ -51,7 +51,7 @@
__webpack_require__(5271)
);
const _loadablesharedruntime = /*#__PURE__*/ _interop_require_default._(
- __webpack_require__(3154)
+ __webpack_require__(6145)
);
const isServerSide = "object" === "undefined";
// Normalize loader to return the module as form { default: Component } for `React.lazy`.
@@ -152,11 +152,7 @@
/***/
},
- /***/ 5282: /***/ (
- __unused_webpack_module,
- exports,
- __webpack_require__
- ) => {
+ /***/ 77: /***/ (__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
/* __next_internal_client_entry_do_not_use__ cjs */
Object.defineProperty(exports, "__esModule", {
@@ -179,7 +175,7 @@
/***/
},
- /***/ 3154: /***/ (
+ /***/ 6145: /***/ (
__unused_webpack_module,
exports,
__webpack_require__
@@ -221,7 +217,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
const _react = /*#__PURE__*/ _interop_require_default._(
__webpack_require__(5271)
);
- const _loadablecontextsharedruntime = __webpack_require__(5282);
+ const _loadablecontextsharedruntime = __webpack_require__(77);
function resolve(obj) {
return obj && obj.default ? obj.default : obj;
}
@@ -456,7 +452,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/***/
},
- /***/ 5519: /***/ (
+ /***/ 2736: /***/ (
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -471,7 +467,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ =
__webpack_require__(2676);
/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ =
- __webpack_require__(5509);
+ __webpack_require__(7065);
/* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1___default =
/*#__PURE__*/ __webpack_require__.n(
next_dynamic__WEBPACK_IMPORTED_MODULE_1__
@@ -480,12 +476,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
const DynamicHello = next_dynamic__WEBPACK_IMPORTED_MODULE_1___default()(
() =>
__webpack_require__
- .e(/* import() */ 1393)
- .then(__webpack_require__.bind(__webpack_require__, 1393))
+ .e(/* import() */ 9081)
+ .then(__webpack_require__.bind(__webpack_require__, 9081))
.then((mod) => mod.Hello),
{
loadableGenerated: {
- webpack: () => [/*require.resolve*/ 1393],
+ webpack: () => [/*require.resolve*/ 9081],
},
}
);
@@ -512,12 +508,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/***/
},
- /***/ 5509: /***/ (
+ /***/ 7065: /***/ (
module,
__unused_webpack_exports,
__webpack_require__
) => {
- module.exports = __webpack_require__(5600);
+ module.exports = __webpack_require__(9565);
/***/
},
@@ -527,7 +523,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
/******/ var __webpack_exec__ = (moduleId) =>
__webpack_require__((__webpack_require__.s = moduleId));
/******/ __webpack_require__.O(0, [2888, 9774, 179], () =>
- __webpack_exec__(8174)
+ __webpack_exec__(848)
);
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for 717-HASH.js
Diff too large to display
mischnic
force-pushed
the
mischnic/server-actions-sourcemap
branch
from
September 9, 2024 19:06
69a7486
to
2bcfe6e
Compare
mischnic
force-pushed
the
mischnic/server-actions-sourcemap
branch
from
September 10, 2024 07:01
2bcfe6e
to
e09453b
Compare
mischnic
changed the title
Turbopack: Fix fix server action sourcemaps
Turbopack: Fix server action sourcemaps
Sep 10, 2024
sokra
approved these changes
Sep 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
created-by: Turbopack team
PRs by the Turbopack team.
tests
Turbopack
Related to Turbopack with Next.js.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #69861
Closes PACK-3240
The sourcemaps of server actions were invalid, the listed source file was the file
AssetIdent
liketurbopack://[project]/bench/basic-app/app/actions.ts [app-client] (ecmascript, action)
instead of only the source file path.This broke the sourcemap mapping logic of the error overlay.