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

Make embroider-compatible #701

Merged
merged 2 commits into from
Jan 25, 2021
Merged

Make embroider-compatible #701

merged 2 commits into from
Jan 25, 2021

Conversation

bendemboski
Copy link
Member

We can't use the postprocessTree() hook anymore, so fix the asset URLs by adding a <base href=".."> element via the contentFor() hook, and make testem work by writing a new <script> tag with the working testem.js URL, leaving the exists one in place harmlessly no-op'ing.

We can't use the postprocessTree() hook anymore, so fix the asset URLs by adding a `<base href="..">` element via the `contentFor()` hook, and make testem work by writing a new `<script>` tag with the working `testem.js` URL, leaving the exists one in place harmlessly no-op'ing.
@bendemboski
Copy link
Member Author

@rwwagner90 can you test this in your app? I'm particularly wary of the <base href=""> tag change, to make sure it works with other assets, like <img> tags rendered in hbs files.

// https://ember-electron.js.org/versions/v3.0.0-beta.5/docs/faq/routing-and-asset-loading)
return [injectScript('shim-test-head.js'), '<base href="..">'].join(
'\n'
);
Copy link
Member Author

Choose a reason for hiding this comment

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

shakes fist at prettier

@bendemboski bendemboski merged commit 8d6080e into master Jan 25, 2021
@bendemboski bendemboski deleted the embroider branch January 25, 2021 05:22
jacobq pushed a commit to jacobq/ember-electron that referenced this pull request May 10, 2022
!! CHERRY PICK !! See 8d6080e

Make embroider-compatible

We can't use the postprocessTree() hook anymore, so fix the asset URLs by adding a `<base href="..">` element via the `contentFor()` hook, and make testem work by writing a new `<script>` tag with the working `testem.js` URL, leaving the exists one in place harmlessly no-op'ing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants