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
In a freshly created Rails 6.1.1 app, have a component that imports SCSS:
// app/javascript/components/MyHomePage/index.jsximportReactfrom'react'importPropTypesfrom'prop-types'import'index.css'// Works when commenting out this lineconstMyHomePage=({ tagline })=><>Tagline: {tagline}</>MyHomePage.propTypes={tagline: PropTypes.string.isRequired,}exportdefaultMyHomePage
React::ServerRendering::PrerenderError at /deals/a/files
Encountered error "#<ExecJS::ProgramError: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.>"
Steps to reproduce
In a freshly created Rails 6.1.1 app, have a component that imports SCSS:
Expected behavior
Should prerender the component without errors.
Actual behavior
It fails with this error:
System configuration
Sprockets or Webpacker version:
React-Rails version: 2.6.1
Rect_UJS version:
Rails version: 6.1.1
Ruby version: 2.7.2
The text was updated successfully, but these errors were encountered: