feat(url_resolver): support package: urls (fixes #2991)#3215
feat(url_resolver): support package: urls (fixes #2991)#3215yjbanov merged 1 commit intoangular:masterfrom
Conversation
There was a problem hiding this comment.
would be nice if we could choose the package path via config. Would that be possible here?
There was a problem hiding this comment.
yeah can you include this into the bindings. it would be nice to provide an array of conventions.
bind(URL_CONFIG).toValue([
{ package: 'node', url:'/node_modules/' },
{ package: 'bower', url:'/bower_components/' },
{ package: 'web', url:'/web_modules/' }
])There was a problem hiding this comment.
Yes, please make this configurable via an OpaqueToken. Maybe use @Optional and throw if not set and packages is used, as I doubt that people really serve their node_modules folder in production...
There was a problem hiding this comment.
Having never used bower (and not sure where web_modules are coming from, webpack?) I would not be able to verify that it works properly, so I'll punt on this here but I logged #3257 so we do not forget.
05399cd to
01a820f
Compare
01a820f to
db362fc
Compare
There was a problem hiding this comment.
Could we not have this method here? I.e. the getOuterHTML for the browser_adapter.ts does not include this logic. Instead, a user should just do what you do in the implementation: DOM.getOuterHTML(document.documentElement), which works in Dart and JS
There was a problem hiding this comment.
If you make the UrlResolver configurable via a token, we don't need a custom UrlResolver for the demos at all!
There was a problem hiding this comment.
leaving UrlResolver untouched, so this still makes sense.
|
As talked offline: for now let’s just add the |
db362fc to
ff9bd6e
Compare
ff9bd6e to
408618b
Compare
Fixes #2991