Skip to content
New issue

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

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

Already on GitHub? # to your account

[bug]: Load JS resources from root #1257

Merged
merged 4 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/venia-concept/templates/open-document.mst
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
{{> templates/default-font-include}}
<link rel="preconnect" href="{{env.MAGENTO_BACKEND_URL}}">
{{#bundles.prefetch}}
<link rel="prefetch script" href="{{.}}">
<link rel="prefetch script" href="/{{.}}">
Copy link
Contributor

Choose a reason for hiding this comment

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

These values are provided by the asset-manifest which is created by the webpack asset manifest plugin. This plugin provides a publicPath prop which we should be using to prepend the forward slash rather than hardcoding in the templates.

{{/bundles.prefetch}}
2 changes: 1 addition & 1 deletion packages/venia-concept/templates/seed-bundles.mst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#bundles.load}}
<script defer src="{{.}}"></script>
<script defer src="/{{.}}"></script>
{{/bundles.load}}