Skip to content

feat(turbopack): externalType support script #80768

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

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

fireairforce
Copy link
Contributor

This pr introduce a new external type: Script, which has the same behaviour as webpack's https://webpack.js.org/configuration/externals/#externalstypescript

And i also refer to the webpack's implement, this external type accept a request like: root@script_url which same as webpack:

image

In the utoo, we use it as follows:

https://github.com/umijs/mako/blob/next/crates/pack-core/src/shared/resolve/externals_plugin.rs#L202-L208

It will generate runtime code to load the external package from the script_url

@ijjk ijjk added the Turbopack Related to Turbopack with Next.js. label Jun 22, 2025
@ijjk
Copy link
Member

ijjk commented Jun 22, 2025

Allow CI Workflow Run

  • approve CI run for commit: 10a001d

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Copy link

codspeed-hq bot commented Jun 22, 2025

CodSpeed Performance Report

Merging #80768 will not alter performance

Comparing fireairforce:support-script-external (10a001d) with canary (9256109)

Summary

✅ 3 untouched benchmarks
⁉️ 9 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
⁉️ build[date-fns-all] 2.8 s N/A N/A
⁉️ build[date-fns-single] 1.6 s N/A N/A
⁉️ build[framer-motion-all] 3.9 s N/A N/A
⁉️ build[framer-motion-single] 2.7 s N/A N/A
⁉️ build[joy] 2.5 s N/A N/A
⁉️ build[lucide-react-all] 12.4 s N/A N/A
⁉️ build[lucide-react-single] 1 s N/A N/A
⁉️ build[mui] 3.9 s N/A N/A
⁉️ build[shiki] 6.3 s N/A N/A

@ijjk
Copy link
Member

ijjk commented Jun 23, 2025

Tests Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants