-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
SystemJS docs specify a Promise https://github.com/systemjs/systemjs/blob/main/docs/system-register.md#importmetaresolve-id-parenturl--promise
Documentation for import.resolve()
suggests it returns a string. see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve
When writing code like the following and using Rollup it will use the SystemJS context to implement import.resolve.
const url = import.resolve('./i18n/en-US.json')
// url should be a string, but when compiled and implemented as SystemJS module returns Promise<string>
// assertion will fail, as returned value is 'promise'
assert(typeof url === 'string')
Both node and browser versions of SystemJS seem to have this issue.
Line 49 in 9647576
return Promise.resolve(loader.resolve(id, parentUrl || parentId)); |
Metadata
Metadata
Assignees
Labels
No labels