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

Revert "Enable externalHelpers when pre compiling Next.js' code" #37829

Merged
merged 1 commit into from
Jun 19, 2022

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Jun 19, 2022

This temporarily reverts the external helpers being used for building the next files as it seems to be triggering dynamic code evaluation errors still so we will need to investigate further.

Failed to compile.
--
13:11:06.874 |  
13:11:06.874 | ../node_modules/@swc/helpers/src/_is_native_function.js
13:11:06.874 | Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Middleware middleware
13:11:06.875 | Used by default
13:11:06.875 |  
13:11:06.875 | Import trace for requested module:
13:11:06.875 | ../node_modules/@swc/helpers/src/index.js
13:11:06.875 | ../node_modules/next/dist/client/router.js
13:11:06.875 | ../node_modules/next/router.js

Reverts #37164

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels Jun 19, 2022
@ijjk ijjk marked this pull request as ready for review June 19, 2022 18:19
@ijjk ijjk merged commit 081c21b into canary Jun 19, 2022
@ijjk ijjk deleted the revert-37164-external-helper-build branch June 19, 2022 18:19
@SukkaW
Copy link
Contributor

SukkaW commented Jun 20, 2022

@ijjk

That's really weird. node_modules/@swc/helpers/src/index.js wouldn't be imported directly with the latest version of swc.

I have checked the pre-compiled files on my local machine, there is no trace of _is_native_function or _wrap_native_super being imported.

The only reason node_modules/@swc/helpers/src/index.js would be imported is that the local @swc/core version is outdated. This might have something to do with the pnpm though.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants