Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "style" attribute to package.json #140

Open
Adevweb opened this issue May 29, 2024 · 0 comments
Open

Add "style" attribute to package.json #140

Adevweb opened this issue May 29, 2024 · 0 comments

Comments

@Adevweb
Copy link

Adevweb commented May 29, 2024

Hello !

Thanks for this feature !

I try to use it with Symfony 6.4.2 and with AssetMapper 6.4.2 component who manage JS/CSS files with an importmap HTML script tag.

To add this feature in my importmap.php I run :
php bin/console importmap:require notyf

This command search on https://cdn.jsdelivr.net any package who match and download the package.
It works well, I have the notyf in my HTML but no CSS to view the toast on my screen 😄

If the "style" attribute is defined in the package.json, it download the style file automatically.

Without this attribute, I have to manually run :
php bin/console importmap:require notyf/notyf.min.css
to add the css file in my vendor.

You can see more in official Symfony documentation here : https://symfony.com/doc/current/frontend/asset_mapper.html#handling-3rd-party-css

Sorry if my english is not perfect !

Thanks, have a nice day !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant