Repository navigation
feat: support inline ES modules with executeScript - #2808
sy-records wants to merge 1 commit into
Conversation
|
@sy-records is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
58b6b4e to
24a991b
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@sy-records Copilot can't commit to the branch (because it's in your account) so here are the patches it would have applied to get module imports with relative paths to be relative to the markdown file so that it works the same in both hash and history router modes:
|
Execute inline module scripts through a new script element so the browser can handle static imports, exports, and top-level await. Preserve classic script execution and first-script selection behavior. Keep external modules handled by the external-script plugin. Add browser regression tests and a manual demo. Document asynchronous execution and relative import resolution.
|
The regular expression you provided may convert to a plain string, and path concatenation using the hash pattern may also cause the I'll come take a look at it. |
Summary
Execute inline module scripts through a new script element so the browser can handle static imports, exports, and top-level await.
Preserve classic script execution and first-script selection behavior. Keep external modules handled by the external-script plugin.
Add browser regression tests and a manual demo. Document asynchronous execution and relative import resolution.
Related issue, if any:
Close #2010
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Tested in the following browsers: