Skip to content

Incorrectly changing import extension #8

@mmakarios

Description

@mmakarios

I have the following directory tree in a React application:

- checkout
  - OrderPage.js
  - OrderPage.scss

OrderPage.js imports OrderPage.scss with:

import './OrderPage.scss';

I want to create a second folder called order and move both files, like the following:

- checkout
- order
  - OrderPage.js
  - OrderPage.scss

What happens is when I move OrderPage.js, its import statement changes to reference itself:

import './OrderPage.js';

It doesn't matter if I move the SCSS file first and then the JS, the result is the same.
The solution to my case is relatively simple: just change the import extension to .scss again. But I think it is worth reporting it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions