Skip to content
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

Fix sourcemaps for internal client boundaries #72922

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions packages/next/taskfile-swc.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,6 @@ module.exports = function (task) {
const output = yield transform(source, options)
const ext = path.extname(file.base)

// Make sure the output content keeps the `"use client"` directive.
// TODO: Remove this once SWC fixes the issue.
if (/^['"]use client['"]/.test(source)) {
output.code =
'"use client";\n' +
output.code
.split('\n')
.map((l) => (/^['"]use client['"]/.test(l) ? '' : l))
.join('\n')
}

// Replace `.ts|.tsx` with `.js` in files with an extension
if (ext) {
const extRegex = new RegExp(ext.replace('.', '\\.') + '$', 'i')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('Dynamic IO Dev Errors', () => {
`See more info: https://nextjs.org/docs/messages/next-prerender-missing-suspense` +
'\n at Page [Server] (<anonymous>)' +
// TODO(veil): Should be ignore-listed. Feel free to adjust the component name since it's Next.js internals.
'\n at InnerLayoutRouter (' +
'\n at parallelRouterKey (' +
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sourcemap bug. will file this separately against SWC.

(isTurbopack
? 'node_modules'
: // TODO(veil): Why is this not pointing to n_m in Webpack?
Expand Down
Loading