refactoring-codemods icon indicating copy to clipboard operation
refactoring-codemods copied to clipboard

import './style.css' goes to import './style'

Open tnrich opened this issue 7 years ago • 6 comments

Hey there,

I think the title says most of it:

import './style.css' goes to import './style'

Anyway to make that stop from happening?

Other than that, amazing tool!

tnrich avatar Jun 09 '17 23:06 tnrich

Thanks for the report and glad you like the tool!

I'm mid flight on resolving this issue. I'll keep this open until I get something pushed.

jurassix avatar Jun 12 '17 15:06 jurassix

The main issue is when we reconstruct the import paths we assume .js and drop the extension. This also affects moving .css files and updating js file references etc.

jurassix avatar Jun 12 '17 15:06 jurassix

also not scoped to just .css all non .js extensions are affected.

jurassix avatar Jun 12 '17 15:06 jurassix

Can we add a failing test for this? I tried but wasn't able to make a test reproducing this issue.

tnrich avatar Sep 28 '17 05:09 tnrich

Yeah I'll take a look.

jurassix avatar Sep 28 '17 17:09 jurassix

+1 for this issue, but really freeking awesome tool. You deserve all the 🍺

ryanmeisters avatar Dec 04 '17 01:12 ryanmeisters