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 support for .postcss files #594

Merged
merged 1 commit into from Aug 9, 2019

Conversation

Lyrkan
Copy link
Collaborator

@Lyrkan Lyrkan commented Jun 19, 2019

This PR closes #592 by making the .css rule also process .postcss files when Encore.enablePostCssLoader() has been called.

It seems that it can be useful in a Vue.js context in order to have proper syntax highlighting in IDEs by using lang="postcss", as explained on https://vue-loader-v14.vuejs.org/en/features/postcss.html:

Since vue-loader handles PostCSS on its styles internally, you only need to apply postcss-loader to standalone CSS files. There's no need to specify lang="postcss" on a style block if there is a PostCSS config file in your project.

Sometimes the user may want to use lang="postcss" only for syntax highlighting purposes.

@weaverryan
Copy link
Member

Thanks @Lyrkan! Looks very sensible - great tests, as usual, which is HUGE :)

@weaverryan weaverryan merged commit f42da34 into symfony:master Aug 9, 2019
weaverryan added a commit that referenced this pull request Aug 9, 2019
This PR was merged into the master branch.

Discussion
----------

Add support for .postcss files

This PR closes #592 by making the `.css` rule also process `.postcss` files when `Encore.enablePostCssLoader()` has been called.

It seems that it can be useful in a Vue.js context in order to have proper syntax highlighting in IDEs by using `lang="postcss"`, as explained on https://vue-loader-v14.vuejs.org/en/features/postcss.html:

> Since vue-loader handles PostCSS on its styles internally, you only need to apply postcss-loader to standalone CSS files. There's no need to specify lang="postcss" on a style block if there is a PostCSS config file in your project.
>
> Sometimes the user may want to use lang="postcss" only for syntax highlighting purposes.

Commits
-------

f42da34 Add support for .postcss files
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

Successfully merging this pull request may close these issues.

Add a .postcss test in enablePostCssLoader
2 participants