rsnext/packages/next/constants.js
Jiachi Liu 79a85b73ad
Alias all client, shared, pages dist assets for esm (#41034)
Alias all existing imports from `next/dist/..` to `next/dist/esm` for edge compiler. So that we don't need checking for `process.env.NEXT_RUNTIME === 'edge'` or passing down `nextRuntime` to decide wether the esm or cjs asset to require

This will also fix the issue that some layouts hook are been included twice into the bundle with cjs and esm bundle in edge runtime, now only esm chunk will be bundled in server.
2022-09-29 21:24:04 +00:00

1 line
56 B
JavaScript

module.exports = require('./dist/shared/lib/constants')