-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
S-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug
Description
What happened?
使用 umi 里面的 example 为例子:
https://github.com/umijs/umi/blob/master/examples/legacy/.umirc.ts#L5-L10
export default {
legacy: {
checkOutput: true,
},
externals: {
lodash: [
'script https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js',
'_',
],
},
utoopack: {}
};开启 utoopack 构建,构建之后 utoopack 会用 loadChunkByUrl 去做加载: https://github.com/utooland/next.js/blob/utoo/turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts#L239-L245
实测这个加载方法对 script url 没效果。
需要单独构造一个运行时的 loadScript 方法出来。
Expected result
能正常运行。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
S-Bug-confirmedStatus: report has been confirmed as a valid bugStatus: report has been confirmed as a valid bug