Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
913 stars 137 forks source link

[AssetMapper] Scoped npm packages (e.g. @hotwired/turbo) not resolved #2274

Closed adeys closed 7 months ago

adeys commented 10 months ago

Hi @Haehnchen

Thanks for the really great work you're doing on this plugin. The support for importmap is also very helpful. But as shown as on the below pictures, scoped npm packages (@hotwired/turbo, @hotwired/stimulus) are not fully resolved and the autocomplete is biased.

Packages unresolved

This is resolved when I copy assets/vendor/@hotwired/stimulus/stimulus.index.js to assets/vendor/@hotwired/stimulus.js Packages resolved

Digging through the code it should be fixed by checking the specific case of scoped npm packages when a file has slashes. I'll propose a fix PR in the comment.

Thanks

adeys commented 10 months ago

Proposed fix : #2275

chapterjason commented 10 months ago

What about typescript?

adeys commented 10 months ago

Hey @chapterjason,

Are you talking about stimulus controllers written using typescript ?

chapterjason commented 10 months ago

@adeys Yes

adeys commented 10 months ago

@chapterjason It works with typescript controllers too. The dependencies are resolved by the plugin but you'll have to tweak your tsconfig.json file to make typescript compiler happy

Haehnchen commented 7 months ago

https://blog.jetbrains.com/phpstorm/2024/04/phpstorm-2024-1-is-now-available/#support-for-symfony’s-assetmapper closed. asset mapper is include in PhpStorm itself, features should go directly into their issue tracker.