Skip to content

Search for index.js in module path #1252

Closed
@DmitryOlkhovoi

Description

@DmitryOlkhovoi

Description

I have component module in App folder, and I have the source file of the module named index.js
I'm trying to import the module like this:
import App from './App

Expected behavior

I want the builder to import the component module App.

Actual behavior

It doesn't import the module and crashes with the error:

public/app/src/App.js` does not match the corresponding path on disk - File does not exist.

I underspend why it happens but why the default builder has a such behavior? Why i need import my module like this:
import App from './App/index.js'

It is not comfortable and I think it's bad to keep all the modules in the same directory without mention the css files... The default configuration contributes to use a bad folder hierarchy

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