WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
201692
ES Modules should respect <base> tag
https://bugs.webkit.org/show_bug.cgi?id=201692
Summary
ES Modules should respect <base> tag
Guy Bedford
Reported
2019-09-11 11:50:27 PDT
When using the <base href> tag, the value should affect the resolution of ES modules when resolving top-level module scripts with relative imports. For example: ``` <base href="/modules/" /> <script type="module"> import './module.js'; </script> ``` should load `/modules/module.js` and not `/module.js`.
Attachments
Add attachment
proposed patch, testcase, etc.
Guy Bedford
Comment 1
2019-09-11 11:55:32 PDT
Correction: the problem is specifically for dynamic imports: ``` <base href="/modules/" /> <script type="module"> import('./module.js'); </script> ``` where the top-level parent for the dynamic import should still respect the base.
Radar WebKit Bug Importer
Comment 2
2019-09-13 20:23:26 PDT
<
rdar://problem/55361194
>
Yusuke Suzuki
Comment 3
2020-06-15 18:22:52 PDT
The problem is that import is using SourceOrigin information. We should add a flag to that like, "this source is inlined script etc.".
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug