You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got my project build from this repo working correctly in calling ReactDOM.render, but oddly enough when I move the .render call into a function, it isn't working as expected:
importReactfrom'react'importReactDOMfrom'react-dom'functionComponent(): void{return<div>Hello world from React!</div>}exportfunctionauthorNavBootstrap(): void{constmountNode=document.getElementById('my-react-root')ReactDOM.render(<Component/>,mountNode)}
When I import this into a separate snowpack project (using file:../path/to/lib) and in my src js I import '@my-namespace/my-library', the React app is rendered for some reason... And even worse, when I import { authorNavBootstrap } from '@my-namespace/my-library'; authorNavBootstrap() I get this error:
Uncaught SyntaxError: The requested module './web_modules/@my-namespace/my-library.js' does not provide an export named 'authorNavBootstrap'...
The text was updated successfully, but these errors were encountered:
I've got my project build from this repo working correctly in calling ReactDOM.render, but oddly enough when I move the .render call into a function, it isn't working as expected:
When I import this into a separate snowpack project (using
file:../path/to/lib
) and in my src js Iimport '@my-namespace/my-library'
, the React app is rendered for some reason... And even worse, when Iimport { authorNavBootstrap } from '@my-namespace/my-library'; authorNavBootstrap()
I get this error:The text was updated successfully, but these errors were encountered: