next.js
2308ce05 - feat(turbopack): externalType support script (#80768)

Commit
209 days ago
feat(turbopack): externalType support script (#80768) 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](https://github.com/user-attachments/assets/f5b7489d-c4e5-4daa-aa5b-f92e10051c0d) 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`
Author
Parents
Loading