Skip to content

Nested .jsx imports in React example not working by default? #244

@dph-jan

Description

@dph-jan

I've followed these instructions to setup a new Electron app with React: https://www.electronforge.io/guides/framework-integration/react

Everything worked fine until I created the new folder 'src/components', moved my app.jsx there, updated the import path in renderer.js and added additional .jsx files which I imported in app.jsx. Now these nested .jsx imports gave me a Module not found: Error: Can't resolve './Test' in '...src/components' error until I manually added

resolve: { extensions: ['.js', '.ts', '.tsx', '.jsx', '.json'] }

to webpack.renderer.config.js.

Am I doing something wrong here or is this maybe a common scenario that should be mentioned in the instructions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions