Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2786 (links in HTML files in sub directories) #2794

Conversation

codingphil
Copy link

↪️ Pull Request

Fixes bug #2786

See description of the bug above.

Now in Asset.replaceBundleNames() for each bundle of which the URL is inserted into asset content the a URL relative to its parent bundle is calculated so the URL is correct when the bundled output is deployed. This is only done when a relative public URL is specified in the options.

🚨 Test instructions

See added integration tests in packages/core/integration-tests/test/html.js

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@mischnic
Copy link
Member

Not sure if this is correct, but tests are failing on Windows (likely \ instead of /) - maybe you need to use the functions at path.posix.* instead of path.*.

@codingphil
Copy link
Author

Not sure if this is correct, but tests are failing on Windows (likely \ instead of /) - maybe you need to use the functions at path.posix.* instead of path.*.

The path stored in the bundle object is always OS dependent which is OK in my opinion.
However, the link in the asset (HTML file) should always use unix-style directory separators in the URLs. With the first commit f73912d only for relative paths the directory separator was converted to unix-style but not for the absolute paths. The behavior for the absolute paths did not change.
With the commit 3c9f776 the URLs now always use unix-style directory separators in URLs.

@codingphil
Copy link
Author

codingphil commented Mar 15, 2019

Now the test "elm should produce a basic Elm bundle" is failing and I'm not sure about the cause.
It says "The binary data at /home/vsts/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat is corrupt."
https://dev.azure.com/devongovett/devongovett/_build/results?buildId=1352&view=ms.vss-test-web.build-test-results-tab

Other tests are just failing with exit code 1.

@mischnic
Copy link
Member

You can ignore the elm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants