-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Move core files to src folder and move JS files to TypeScript #44405
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
timneutkens
requested review from
ijjk,
shuding,
styfle,
a team,
padmaia and
huozhi
as code owners
December 28, 2022 19:40
Failing test suitesCommit: bf492f4
Expand output● Test suite failed to run
Read more about building and testing Next.js in contributing.md. |
Stats from current PRDefault Build (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack)
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
DiffsDiff for page.js@@ -8618,7 +8618,7 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
/***/
},
- /***/ 1708: /***/ (
+ /***/ 1036: /***/ (
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -8627,13 +8627,13 @@ Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`;
__webpack_require__.bind(__webpack_require__, 1210)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.bind(__webpack_require__, 6448)
+ __webpack_require__.bind(__webpack_require__, 2973)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.bind(__webpack_require__, 9916)
+ __webpack_require__.bind(__webpack_require__, 6448)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.bind(__webpack_require__, 2973)
+ __webpack_require__.bind(__webpack_require__, 9916)
);
/***/ Diff for middleware-b..-manifest.js@@ -9,7 +9,7 @@ self.__BUILD_MANIFEST = {
rootMainFiles: [
"static/chunks/webpack-c452a3e31b73f504.js",
"static/chunks/152-792c0b16c9234019.js",
- "static/chunks/main-app-4d7c16c03a2fbff0.js"
+ "static/chunks/main-app-c9a0aaff35eafcb5.js"
],
pages: {
"/": [ Diff for main-app-HASH.js@@ -1,7 +1,7 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[744],
{
- /***/ 3731: /***/ function(
+ /***/ 9915: /***/ function(
__unused_webpack_module,
__unused_webpack_exports,
__webpack_require__
@@ -10,13 +10,13 @@
__webpack_require__.t.bind(__webpack_require__, 429, 23)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.t.bind(__webpack_require__, 8138, 23)
+ __webpack_require__.t.bind(__webpack_require__, 1161, 23)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.t.bind(__webpack_require__, 9379, 23)
+ __webpack_require__.t.bind(__webpack_require__, 8138, 23)
);
Promise.resolve(/* import() eager */).then(
- __webpack_require__.t.bind(__webpack_require__, 1161, 23)
+ __webpack_require__.t.bind(__webpack_require__, 9379, 23)
);
/***/
@@ -28,7 +28,7 @@
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [152], function() {
- return __webpack_exec__(7070), __webpack_exec__(3731);
+ return __webpack_exec__(7070), __webpack_exec__(9915);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__; |
SukkaW
reviewed
Dec 30, 2022
timneutkens
changed the title
Move core files to src folder
Move core files to src folder and move JS files to TypeScript
Dec 30, 2022
hanneslund
approved these changes
Jan 3, 2023
3 tasks
ijjk
added a commit
that referenced
this pull request
Jan 31, 2023
This fixes a regression in our source map generating which got lost in the big diff from the `src` folder restructure in #44405 These invalid source maps broken plugins that attempted to leverage them like `@sentry/nextjs` which only attempts in a production environment https://github.com/getsentry/sentry-javascript/blob/15ec85bead77100413381be821f42841ae114f93/packages/nextjs/src/config/webpack.ts#L586 For a regression test in a follow-up we will need to investigate a production test fixture with `@sentry/nextjs` although this requires a DSN be configured. This also ensures we setup `unhandledRejection` and `uncaughtException` listeners during build so that we have proper stack information when these occur and the process isn't left hanging. This also moves the `extensionAlias` config from #44177 to an experimental config as it seems to cause conflicts with ESM packages that define `exports` in their `package.json` which can be considered a breaking change. ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) Fixes: #45419 x-ref: [slack thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1674937545579229)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
src
folder atpackages/next/src
..js
files to TypeScript, note that many of these were external packages so I've addedany
for many of them but it caught a few bugs already. Just making sure all code is consistently TypeScript.First in a series of smaller changes to the folder structure.
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples
pnpm build && pnpm lint