Skip to content

fix(@ngtools/webpack): prevent relative request path mapping#9787

Merged
clydin merged 1 commit intoangular:masterfrom
clydin:limit-path-mapping
Mar 8, 2018
Merged

fix(@ngtools/webpack): prevent relative request path mapping#9787
clydin merged 1 commit intoangular:masterfrom
clydin:limit-path-mapping

Conversation

@clydin
Copy link
Member

@clydin clydin commented Feb 26, 2018

Fixes #9727

const originalRequest = request.request.trim();

// Relative requests are not mapped
if (originalRequest.startsWith('.')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or /?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. done.

@clydin clydin force-pushed the limit-path-mapping branch from ed625cd to e63b8ca Compare March 7, 2018 23:38
@clydin clydin merged commit 5dee617 into angular:master Mar 8, 2018
@clydin clydin deleted the limit-path-mapping branch March 8, 2018 00:17
@eromano
Copy link

eromano commented Mar 21, 2018

@clydin @hansl @filipesilva why has been added this limitation in the paths mapping? It sounds like a problem to me when you develop specially a component library.

For example in my project I have a stucture like:

MY-PROJECT
|->MY-DEMO-APP
|->MY-LIB-COMPONENT

Now if I want point my lib component from my demo app (without publish or at least build the library) what I am currently doing is to relatively point from the tsconfig to my lib.(Otherwise it will get the node_modules version of my library).

Using the tsconfig to map a relative lib has a lot of advantages during the development; in particular the watcher that will keep to check if I modify something in my lib and will let me test it in my demo app.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build error: Zone js wih @ngtools/webpack 1.10.1

4 participants