the regex filters which the plugin's resolvers should use for the initial interception of resource-paths.
TODO: this might be error-prone, since my parsePackageUrl
function requires the specifier to be "jsr:"
.
a better approach might be to use a specifiers
field, similar to the npm-plugin's config.specifiers
option.
but it does come with the downside that the specifier will always be entriely replaced with "jsr:"
.
Optional
globalspecify a global import-map for aliases to resources.
the full import-map within the body of the resolver function should be a merger between this global import-map, and the import-map acquired from the plugin data (i.e. CommonPluginData.importMap). the plugin data's import-map will take a higher priority in case of conflicting key (i.e. same alias key but different absolute path values).
the resolve function will always look for a match for args.path
inside of the import-map,
before resolving it with respect to the current importer or resolve-directory (i.e. args.importer
or args.resolveDir
).
a function that joins/resolves path segments to an absolute path (i.e. a path that the plugin itself can recognize as an absolute path).
typically, only two or one segments are provided at a time, but it's better if your function accepts variable number of segments.
configuration options for the jsrPluginSetup and jsrPlugin functions.