Skip to content

FITB: Import local libraries - #1311

Merged
bnmnetp merged 1 commit into
RunestoneInteractive:mainfrom
dbrianwalton:fitb-mq
Jul 22, 2026
Merged

FITB: Import local libraries#1311
bnmnetp merged 1 commit into
RunestoneInteractive:mainfrom
dbrianwalton:fitb-mq

Conversation

@dbrianwalton

Copy link
Copy Markdown
Contributor

The RS component code defining FITB questions had the option to define additional libraries that would be loaded when the problem is injected into the surrounding HTML. As far as I know, this had not been used beyond the default loading of BTM libraries. PreTeXt did not yet have any way to define those libraries.

When adding the support on the PreTeXt side, I realized that any JS files that were attempting to be loaded from the assets were in the wrong relative location, since import() looks relative to the calling library, which in this case is the RS component itself. So that relative locations based on PreTeXt projects is preserved, this pull request adds the document context to create an absolute URL rather than remain in a relative URL that points the wrong location.

@dbrianwalton

Copy link
Copy Markdown
Contributor Author

See PreTeXtBook/pretext#3054

@bnmnetp
bnmnetp merged commit da0d03a into RunestoneInteractive:main Jul 22, 2026
@bnmnetp

bnmnetp commented Jul 22, 2026

Copy link
Copy Markdown
Member

thanks @dbrianwalton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants