Skip to content

fix(web_package): normalize root paths consistently with ts_devserver - #731

Merged
alexeagle merged 1 commit into
bazel-contrib:masterfrom
jbedard:728-root-paths
May 8, 2019
Merged

alexeagle merged 1 commit into
bazel-contrib:masterfrom
jbedard:728-root-paths

Conversation

@jbedard

@jbedard jbedard commented Apr 30, 2019

Copy link
Copy Markdown
Collaborator

Fixes #728

This adds a common additional_root_paths(ctx) method in web_package.bzl that both ts_devserver and web_package use, similar to html_asset_inject(...) which they already share.

The added test tries to test:

  • local files (=> root URL dir)
  • local subdirectories (=> local paths from the root)
  • files in different directories (=> absolute paths)
  • bin+gen versions of all 3 of those

@alexeagle alexeagle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks! sharing the function certainly seems like the right fix. I wish the tests read a bit more like a reproduction of the issue you encountered - the golden files are more like checksums.

@alexeagle
alexeagle merged commit 6b2b019 into bazel-contrib:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_package and ts_devserver use different root paths

3 participants