mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
7905cb4cc3
(#86375) Closes PACK-5936 This alleviates a long-standing painpoint of `serverExternalPackages`. If you are using `some-utility` which uses `lodash`, and you have to make `lodash` a `serverExternalPackages`, then you'd have to add the correct version of `lodash` to your application's dependencies in package.json. This is not very ergonomic as it leaks the internal implementation of your direct dependencies (you shoudln't have to care about their transitive dependencies). And it's easy to run into a situation where it's impossible to satisfy all dependencies, if you'd have to add two conflicting versions of `lodash` for example. Instead, Turbopack now emits symlinks like ``` .next/node_modules/lodash-98e63531e9336dd0@ -> ../../../../node_modules/.pnpm/lodash@4.17.20/node_modules/lodash .next/node_modules/lodash-ee4fa714b6d81ca3@ -> ../../../../node_modules/.pnpm/lodash@3.10.1/node_modules/lodash ``` .so that `.next/server/chunks/29adj2sd9.js` can then contain a `require("lodash-98e63531e9336dd0")` and alway get the correct version (and without the user having to declare them).
9 lines
135 B
JavaScript
9 lines
135 B
JavaScript
export default function Root({ children }) {
|
|
return (
|
|
<html>
|
|
<head></head>
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|