René's URL Explorer Experiment


Title: Proposal: Provide a way to add externals to webpack config · Issue #2141 · angular/angular-cli · GitHub

Open Graph Title: Proposal: Provide a way to add externals to webpack config · Issue #2141 · angular/angular-cli

X Title: Proposal: Provide a way to add externals to webpack config · Issue #2141 · angular/angular-cli

Description: The issue is that if I use global script via app[0].scripts I cannot use it again in my .ts files. Example: if I have: "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/moment/moment.js", "../node_modules/fullcalenda...

Open Graph Description: The issue is that if I use global script via app[0].scripts I cannot use it again in my .ts files. Example: if I have: "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/moment/...

X Description: The issue is that if I use global script via app[0].scripts I cannot use it again in my .ts files. Example: if I have: "scripts": [ "../node_modules/jquery/dist/jquery.js", &quo...

Opengraph URL: https://github.com/angular/angular-cli/issues/2141

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Proposal: Provide a way to add externals to webpack config","articleBody":"The issue is that if I use global script via app[0].scripts I cannot use it again in my .ts files.\n\nExample: if I have:\n\n```\n      \"scripts\": [\n        \"../node_modules/jquery/dist/jquery.js\",\n        \"../node_modules/moment/moment.js\",\n        \"../node_modules/fullcalendar/dist/fullcalendar.min.js\"\n      ],\n```\n\nI cannot do: `import * as moment from 'moment';`. If I do so, moment will become an empty object. Of course, I can use it without importing it since it is global BUT other libs that depends on moment (angular2-moment in my case) will do `import * as moment from 'moment';`, they will get an empty object and their code will break. \nThen I cannot use this libs. (I think https://github.com/angular/angular-cli/issues/1974 is related)\n\nI cannot remove moment from scripts since I have other global scripts that depend on it (fullcalendar). Maybe there is a way to make all this scripts work without apps[0].scripts but I have not found it.\n\nMy solution is to use webpack externals https://webpack.github.io/docs/library-and-externals.html\n\nIf I add \n\n```\nexternals: {\n      'moment': 'moment'\n    },\n```\n\nto `webpack-build-common.ts` it is working.\n\nI can provide a PR adding externals from `apps[0].externals` to the webpack config. Is it the right solution? \n","author":{"url":"https://github.com/MrChoclate","@type":"Person","name":"MrChoclate"},"datePublished":"2016-09-15T16:51:47Z","url":"https://github.com/angular/angular-cli/issues/2141"}

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:1a40f10e-bbd3-cf66-be65-e31439a4b956
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC024:21DFED:967341:BE3F77:6B021BA3
html-safe-nonce8a22a0fc9e86d75fdc461a4bf86a61b2aea3d815f9f1f2b34727aeb6b4a2c25f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDI0OjIxREZFRDo5NjczNDE6QkUzRjc3OjZCMDIxQkEzIiwidmlzaXRvcl9pZCI6IjY4Nzc3NDg4MzE4ODc0MzI2MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacedf3bbfee68c60a3c6dc60b948f88a41b9f5ce140827823aa82966daaf628735
hovercard-subject-tagissue:177229337
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/angular/angular-cli/2141/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4c84bce5edede6dd6afa4df5a5d8fcaaabdb1b268a48b991f9aa7d6a6486a8c1/angular/angular-cli/issues/2141
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4c84bce5edede6dd6afa4df5a5d8fcaaabdb1b268a48b991f9aa7d6a6486a8c1/angular/angular-cli/issues/2141
og:image:altThe issue is that if I use global script via app[0].scripts I cannot use it again in my .ts files. Example: if I have: "scripts": [ "../node_modules/jquery/dist/jquery.js", "../node_modules/moment/...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMrChoclate
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/2141#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F2141
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%2Fangular%2Fangular-cli%2Fissues%2F2141
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=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/2141
Reloadhttps://github.com/angular/angular-cli/issues/2141
Reloadhttps://github.com/angular/angular-cli/issues/2141
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/2141
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/2141
#3814https://github.com/angular/angular-cli/pull/3814
Proposal: Provide a way to add externals to webpack confighttps://github.com/angular/angular-cli/issues/2141#top
#3814https://github.com/angular/angular-cli/pull/3814
https://github.com/filipesilva
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P1%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
https://github.com/MrChoclate
MrChoclatehttps://github.com/MrChoclate
on Sep 15, 2016https://github.com/angular/angular-cli/issues/2141#issue-177229337
#1974https://github.com/angular/angular-cli/issues/1974
https://webpack.github.io/docs/library-and-externals.htmlhttps://webpack.github.io/docs/library-and-externals.html
https://github.com/clydin
clydinhttps://github.com/clydin
on Sep 19, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-248014034
filipesilvahttps://github.com/filipesilva
needs: investigationRequires some digging to determine if action is neededhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20investigation%22
on Sep 21, 2016https://github.com/angular/angular-cli/issues/2141#event-796709596
https://github.com/isaackehle
isaackehlehttps://github.com/isaackehle
on Oct 4, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-251485133
https://github.com/alejoar
alejoarhttps://github.com/alejoar
on Oct 5, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-251628023
@clydinhttps://github.com/clydin
https://github.com/isaackehle
isaackehlehttps://github.com/isaackehle
on Oct 5, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-251674212
@alejoarhttps://github.com/alejoar
filipesilvahttps://github.com/filipesilva
on Oct 9, 2016https://github.com/angular/angular-cli/issues/2141#event-817412292
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Oct 9, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-252501171
https://github.com/angular/angular-cli#global-library-installationhttps://github.com/angular/angular-cli#global-library-installation
https://github.com/MrChoclate
MrChoclatehttps://github.com/MrChoclate
on Oct 30, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-257155821
@clydinhttps://github.com/clydin
https://github.com/maxailloud
maxailloudhttps://github.com/maxailloud
on Nov 15, 2016https://github.com/angular/angular-cli/issues/2141#issuecomment-260598287
filipesilvahttps://github.com/filipesilva
command: buildhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22command%3A%20build%22
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P1%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
needs: investigationRequires some digging to determine if action is neededhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22needs%3A%20investigation%22
on Nov 21, 2016https://github.com/angular/angular-cli/issues/2141#event-867081930
filipesilvahttps://github.com/filipesilva
on Nov 21, 2016https://github.com/angular/angular-cli/issues/2141#event-867082012
filipesilvahttps://github.com/filipesilva
on Jan 1, 2017https://github.com/angular/angular-cli/issues/2141#event-908686905
fix(scripts): allow using same lib inside apphttps://github.com/filipesilva/angular-cli/commit/ef0d4af975d812eb7777ce8dc76114e77f42ca2c
https://docs.github.com/articles/closing-issues-via-commit-messages
ef0d4afhttps://github.com/filipesilva/angular-cli/commit/ef0d4af975d812eb7777ce8dc76114e77f42ca2c
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jan 1, 2017https://github.com/angular/angular-cli/issues/2141#issuecomment-269909554
#3814https://github.com/angular/angular-cli/pull/3814
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jan 1, 2017https://github.com/angular/angular-cli/issues/2141#issuecomment-269909687
filipesilvahttps://github.com/filipesilva
on Jan 4, 2017https://github.com/angular/angular-cli/issues/2141#event-910602135
fix(scripts): allow using same lib inside apphttps://github.com/filipesilva/angular-cli/commit/acda842c858ea5016c5ed91362c7c7041ee79dee
https://docs.github.com/articles/closing-issues-via-commit-messages
acda842https://github.com/filipesilva/angular-cli/commit/acda842c858ea5016c5ed91362c7c7041ee79dee
https://github.com/gregvis
gregvishttps://github.com/gregvis
on Jan 4, 2017https://github.com/angular/angular-cli/issues/2141#issuecomment-270486390
http://localhost:4200http://localhost:4200
filipesilvahttps://github.com/filipesilva
on Jan 11, 2017https://github.com/angular/angular-cli/issues/2141#event-919236681
fix(scripts): allow using same lib inside apphttps://github.com/filipesilva/angular-cli/commit/c95bbde5c4245cd358a173c59c691db402bbe802
https://docs.github.com/articles/closing-issues-via-commit-messages
c95bbdehttps://github.com/filipesilva/angular-cli/commit/c95bbde5c4245cd358a173c59c691db402bbe802
fix(scripts): allow using same lib inside apphttps://github.com/filipesilva/angular-cli/commit/0f0bbc9dca2f1aab62771378aca43ae92f5c2d6b
https://docs.github.com/articles/closing-issues-via-commit-messages
0f0bbc9https://github.com/filipesilva/angular-cli/commit/0f0bbc9dca2f1aab62771378aca43ae92f5c2d6b
https://github.com/thejewdude
thejewdudehttps://github.com/thejewdude
on Jan 13, 2017https://github.com/angular/angular-cli/issues/2141#issuecomment-272498214
hanslhttps://github.com/hansl
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3814https://github.com/angular/angular-cli/pull/3814
on Jan 20, 2017https://github.com/angular/angular-cli/issues/2141#event-931383280
hanslhttps://github.com/hansl
on Jan 20, 2017https://github.com/angular/angular-cli/issues/2141#event-931383413
fix(scripts): allow using same lib inside app (#3814)https://github.com/angular/angular-cli/commit/a2ea05e5bf883afe08b6222ca85d3a7253762f5e
#3814https://github.com/angular/angular-cli/pull/3814
https://docs.github.com/articles/closing-issues-via-commit-messages
a2ea05ehttps://github.com/angular/angular-cli/commit/a2ea05e5bf883afe08b6222ca85d3a7253762f5e
MRHarrisonhttps://github.com/MRHarrison
on Feb 9, 2017https://github.com/angular/angular-cli/issues/2141#event-954790681
fix(scripts): allow using same lib inside app (angular#3814)https://github.com/MRHarrison/angular-cli/commit/b103e505b7b88613b517d1aa08382a12c3a85fe2
angular#3814https://github.com/angular/angular-cli/pull/3814
https://docs.github.com/articles/closing-issues-via-commit-messages
b103e50https://github.com/MRHarrison/angular-cli/commit/b103e505b7b88613b517d1aa08382a12c3a85fe2
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 6, 2019https://github.com/angular/angular-cli/issues/2141#issuecomment-528882364
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 6, 2019https://github.com/angular/angular-cli/issues/2141#event-2614596254
mostafaibrhttps://github.com/mostafaibr
on May 29, 2026https://github.com/angular/angular-cli/issues/2141#event-26099480733
fix(scripts): allow using same lib inside app (angular#3814)https://github.com/mostafaibr/angular-cli/commit/1331bb0d91e01d87536705c3f036bed248110e7a
angular#3814https://github.com/angular/angular-cli/pull/3814
https://docs.github.com/articles/closing-issues-via-commit-messages
1331bb0https://github.com/mostafaibr/angular-cli/commit/1331bb0d91e01d87536705c3f036bed248110e7a
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/2141
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/2141
filipesilvahttps://github.com/filipesilva
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P1%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%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.