René's URL Explorer Experiment


Title: Better support for loader plugins · Issue #5787 · microsoft/TypeScript · GitHub

Open Graph Title: Better support for loader plugins · Issue #5787 · microsoft/TypeScript

X Title: Better support for loader plugins · Issue #5787 · microsoft/TypeScript

Description: Currently TypeScript does not have a good understanding of loader plugins. Both AMD and SystemJS support the concept of loader plugins (though they vary in format). Currently the only way to integrate a loader plugin is specify the full ...

Open Graph Description: Currently TypeScript does not have a good understanding of loader plugins. Both AMD and SystemJS support the concept of loader plugins (though they vary in format). Currently the only way to integr...

X Description: Currently TypeScript does not have a good understanding of loader plugins. Both AMD and SystemJS support the concept of loader plugins (though they vary in format). Currently the only way to integr...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/5787

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better support for loader plugins","articleBody":"Currently TypeScript does not have a good understanding of loader plugins.  Both AMD and SystemJS support the concept of loader plugins (though they vary in format).  Currently the only way to integrate a loader plugin is specify the full module name as an ambient declaration and describe the shape of what is returned.  For some plugins, this is quite a redundant activity (like a text plugin) since all resources returned by the plugin are text resources.\n\nBoth with AMD and SystemJS (also proposed for ES6 module loader), plugins do not have to return a consistent shape.  Because of this, I think there are two approaches:\n1. Create resolution logic that supports some sort of glob pattern for ambient declarations, with resolution of the most specific declaration.\n2. Integrate more robust functionality in understanding plugins and what shape they return.\n\nFor background reading here is the specification of each:\n- [SystemJS/proposed ES6](https://github.com/systemjs/systemjs/blob/master/docs/creating-plugins.md)\n- [AMD](https://github.com/amdjs/amdjs-api/blob/master/LoaderPlugins.md)\n\nFor SystemJS there are four methods that can be overridden the are exposed by the plugin module:\n- `locate` - Allows a return of an alternative location for the resource.\n- `fetch` - Allows the plugin to fetch the \"raw\" resource.\n- `translate` - Allows the plugin to modify the resource (e.g. translate on the fly from CoffeeScript to JS)\n- `instantiate` - Called when the loader actually tries to instantiate the module.\n\nFor AMD there:\n- `normalize` - Allows the resource ID to be modified\n- `load` - Allows hooking into the actual load and instantiation of the module\n\nRequireJS has support for a couple more, which are specifically geared for building code, but they are not officially part of the AMD standard:\n- `write` - Write out the module\n- `onLayerEnd` - Allows a hook into when a layer is finished\n- `writeFile` - Hook when the file is written\n- `pluginBuilder` - Substitute another module for this module when doing a build\n\nAlso there is a big difference between AMD and SystemJS in the format of the MID for plugins, annoyingly (I won't get on my soap box about how we reinvent the wheel in on the web).  AMD is `[plugin]![resource]` and SystemJS is `[resource]![plugin]`.\n\n@mhegazy asked if plugins change their shape.  My personal experience is with AMD and in that case, in practice, some plugins do change their shape (for example in Dojo we have a module that loads CommonJS modules called `dojo/node`) and others that never change their shape (for example `dojo/text` loads text resources) and ones where the resource ID determines what is loaded (for example `dojo/has` take a feature flag and a ternary operator to determine what it loads).\n\nMy personal feeling is that option 2 would be horribly complex, likely to have all sorts of edge cases, and while highly useful for those using plug-ins, might just become too challenging.  If/when the ES6 Loader is finalised and there is plugin support in there, then having a feature rich analysis of those plugins might be worth the effort.  Until then, I think option 1 would allow people to achieve the most use cases with a minimum amount of complexity.\n\nThis is related to a discussion that came up in #5759.\n","author":{"url":"https://github.com/kitsonk","@type":"Person","name":"kitsonk"},"datePublished":"2015-11-25T09:20:57Z","url":"https://github.com/microsoft/TypeScript/issues/5787"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5045e5ec-807a-923a-04d3-ded1e4d761dc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA5F2:1052C5:6E82D:995B2:6AFBB632
html-safe-nonce592bfeeb718e8dca191437afa622b25c9781206e84d4410838d2f8b51be94e1d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUYyOjEwNTJDNTo2RTgyRDo5OTVCMjo2QUZCQjYzMiIsInZpc2l0b3JfaWQiOiI4MDI2NTcwODMzMTU5NTAxMzYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac38937dc46393f6539582ba07fcdea1e681ace46884c45f001598e808e5a16862
hovercard-subject-tagissue:118793022
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/5787/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d60709cf2b208d0cf032bd82a8cb26bbf74c6592c7ec75c691c6502d1b7993e3/microsoft/TypeScript/issues/5787
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d60709cf2b208d0cf032bd82a8cb26bbf74c6592c7ec75c691c6502d1b7993e3/microsoft/TypeScript/issues/5787
og:image:altCurrently TypeScript does not have a good understanding of loader plugins. Both AMD and SystemJS support the concept of loader plugins (though they vary in format). Currently the only way to integr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekitsonk
hostnamegithub.com
expected-hostnamegithub.com
None2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee4cce0e99cf61481a318ff12c2e8580153a6c7c6
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/5787#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F5787
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F5787
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/5787
Reloadhttps://github.com/microsoft/TypeScript/issues/5787
Reloadhttps://github.com/microsoft/TypeScript/issues/5787
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests334 (334)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/pulse
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/5787
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/5787
Better support for loader pluginshttps://github.com/microsoft/TypeScript/issues/5787#top
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Nov 25, 2015https://github.com/microsoft/TypeScript/issues/5787#issue-118793022
SystemJS/proposed ES6https://github.com/systemjs/systemjs/blob/master/docs/creating-plugins.md
AMDhttps://github.com/amdjs/amdjs-api/blob/master/LoaderPlugins.md
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
#5759https://github.com/microsoft/TypeScript/pull/5759
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161059887
Kitson Kelly (@kitsonk)https://github.com/kitsonk
Vladimir Matveev (@vladima)https://github.com/vladima
#5039https://github.com/microsoft/TypeScript/issues/5039
#2709https://github.com/microsoft/TypeScript/issues/2709
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#event-479304583
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161074957
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161080152
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161080224
Vladimir Matveev (@vladima)https://github.com/vladima
Wesley Wigham (@weswigham)https://github.com/weswigham
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Dec 1, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161107337
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Dec 2, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-161144620
https://github.com/frankwallis
Frank Wallis (frankwallis)https://github.com/frankwallis
on Dec 7, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-162510723
#2709https://github.com/microsoft/TypeScript/issues/2709
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Dec 7, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-162530366
#2709https://github.com/microsoft/TypeScript/issues/2709
#2709https://github.com/microsoft/TypeScript/issues/2709
#2709https://github.com/microsoft/TypeScript/issues/2709
https://github.com/frankwallis
Frank Wallis (frankwallis)https://github.com/frankwallis
on Dec 7, 2015https://github.com/microsoft/TypeScript/issues/5787#issuecomment-162544008
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
on Dec 7, 2015https://github.com/microsoft/TypeScript/issues/5787#event-484711896
https://github.com/nillis
Niels Timmermans (nillis)https://github.com/nillis
on Jan 21, 2016https://github.com/microsoft/TypeScript/issues/5787#issuecomment-173497781
https://www.npmjs.com/package/gulp-angular-embed-templateshttps://www.npmjs.com/package/gulp-angular-embed-templates
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Jan 25, 2016https://github.com/microsoft/TypeScript/issues/5787#issuecomment-174647307
#6615https://github.com/microsoft/TypeScript/issues/6615
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 25, 2016https://github.com/microsoft/TypeScript/issues/5787#event-525497716
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Jan 25, 2016https://github.com/microsoft/TypeScript/issues/5787#event-525497865
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/5787#event-1689625538
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/5787
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/5787
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.