We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
new URL
import.meta.url
Noticed as part of debugging #1408 (comment) that certain bundled asset were not loading correctly after running the build command.
build
const template = document.createElement('template'); export default class HeaderComponent extends HTMLElement { #logo = new URL("../../assets/greenwood-logo.png", import.meta.url); connectedCallback() { if (!this.shadowRoot) { template.innerHTML = ` <header class="header"> <a href="/"> <img src="${this.#logo.pathname.replace(window.location.pathname, "/")}" alt="Greenwood Logo"/> <h4>My Blog</h4> </a> </header> `; this.attachShadow({ mode: 'open' }); this.shadowRoot.appendChild(template.content.cloneNode(true)); } } } customElements.define('app-header', HeaderComponent);
Repro here - https://github.com/ProjectEvergreen/greenwood-getting-started/compare/1408-debug-new-url-import-meta?expand=1
Looking at the generated output, it looks like the file is getting corrupted somehow, with starting source size of 7KB, and ending up as 12KB?
Plus VSCode can't open it
The text was updated successfully, but these errors were encountered:
thescientist13
Successfully merging a pull request may close this issue.
What happened?
Noticed as part of debugging #1408 (comment) that certain bundled asset were not loading correctly after running the
build
command.Steps to reproduce
new URL
+import.meta.url
Repro here - https://github.com/ProjectEvergreen/greenwood-getting-started/compare/1408-debug-new-url-import-meta?expand=1
Environment
Additional Context
Looking at the generated output, it looks like the file is getting corrupted somehow, with starting source size of 7KB, and ending up as 12KB?
Plus VSCode can't open it
The text was updated successfully, but these errors were encountered: