-
Notifications
You must be signed in to change notification settings - Fork 12
transform will not mutate imports with '.' in name #9
Comments
Sorry for the delay on getting back to you on this sooner! The notification email got lost during the holidays. The reason for that check is because we don't want to add a We could do some sketchy things like Another potential option would be some sort of config file, though the infrastructure required to get a config file working properly is pretty high relative to the size of this project so I'm a bit hesitant to go down that route. |
Haven't heard back from you so I'm going to close this. Feel free to re-open it if you want to continue the discussion. |
Yeah, we are good. |
This effectively renders this transformer useless. It is very common, to "type" the name in the filename, i.e. |
"Useless" seems like an overly strong claim here, though "useless for projects that use My recommendation is to just fork the project. You only need to change the |
There should not be any restrictions on the kind of import paths. Imports with a If the answer to a suggested solution, is that I should just fork the project, that is fine to me. But it renders this transformer useless to me and probably to a lot of other users as well, because "sub-typed" filenames ( In the end, I wrote my own transformer, because this transformer also suffers from other problems ( |
The fundamental problem here is that we are doing a transformation on a file extension, which is not particularly well standardized. There are a number of heuristics that one could pick that would work for some subset of use cases, but there are almost no heuristics (and definitely no simple ones) that would work for all users in all scenarios. For this package, I decided to do the simplest mechanism that I believe addresses the needs of most users (including myself importantly) without introducing too much complexity (and thus bugs). I think what you are proposing (just add
Can you provide more details on this and/or your fix?
Is your transformer published to NPM/GitHub? If so I would be happy to link to it in the Readme and this issue so other users wishing the same feature set can find it quickly/easily. |
I am trying to import a module
api.service
, but this transform does not append the thejs
extension. It's due to this code:Any reason for this check?
The text was updated successfully, but these errors were encountered: