Created
September 8, 2021 06:14
-
-
Save YonatanKra/e1a00241db14bfbd7571f7b498972c16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Welcome to ${title}</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './app.element.scss'; | |
import template from '!!raw-loader!./app.element.html'; | |
export class AppElement extends HTMLElement { | |
public static observedAttributes = []; | |
connectedCallback() { | |
const title = 'My Component'; | |
this.innerHTML = template.replace('${title}', title); | |
} | |
} | |
customElements.define('yonatan-root', AppElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '!!raw-loader!*' { | |
const contents: string | |
export = contents | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"types": ["raw-loader.d.ts", "node"], | |
"allowSyntheticDefaultImports": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment