ericclemmons / ericclemmons/click-to-component

How to use the library with webpack?

Open
#72 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.4k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

I using the webpack to build React. How can I use this library with webpack?

My code:
`index.tsx` file
```tsx
const container = document.getElementById('root');
const root = createRoot(container!);
root.render(
<>



);
```
`webpack.config.js` file
```javascript
plugins: ['@babel/plugin-transform-react-jsx-source'],
```

When run I have an error
```
Uncaught TypeError: Cannot read properties of undefined (reading 'columnNumber')
at getPathToSource (getPathToSource.js:12:1)
at handleClick (ClickToComponent.js:43:1)
```

Thank you very much!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.