-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Error in Chrome trying to create a web-component with react and typescript
index.tsx:5 Uncaught TypeError: Cannot read property 'create' of undefined
at Object. (index.tsx:5)
at n (bootstrap:19)
at bootstrap:83
at header-component.min.js:1
i built a simple component:
import * as React from 'react';
export const HeaderComponent = () => {
return <div>Header Component</div>;
};and a index.tsx
import * as React from 'react';
import ReactWebComponent from 'react-web-component';
import { HeaderComponent } from './headercomponent';
ReactWebComponent.create(<HeaderComponent />, 'header-component');i built it with webpack and the awesome-typescript-loader
this is my html file
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<script src="header-component.min.js"></script>
</head>
<body>
<header-component></header-component>
</body>
</html>Is there Support for Typescript available?
Metadata
Metadata
Assignees
Labels
No labels