How to property use createRoot when using custom entries? (export 'default' (imported as 'App') was not found)
#6027
Unanswered
AllenAttuned
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to set up a simple app which is utilizing the custom entry feature of Modern.js:
src/entry.tsxDocs .Based on the docs, creating a file
src/entry.jsx, and setting thesource.enableCustomEntryto be truthy, should allow you to define a custom entry point into the application, rather than Modern.js assumingsrc/App.jsxis the entry.However, using the following
src/entry.jsxcauses Modern.js to fail with this error:My
src/App.tsxcontains the following (using named exports also fails):The
createRootdocs suggest that its argument is optional, and if not provided will use the default fromsrc/App.tsx. This error occurs regardless of if the argument is provided or not. RelevantcreateRootsource.I have the following
modern.config.tswhich is customized to produce an SPA which is to be served statically.Here's some diagnostics about my system:
14.4.1v20.10.0/ NPM10.2.3v17.0.2v2.57.0(recently upgraded - the error also occurred onv2.56.2Beta Was this translation helpful? Give feedback.
All reactions