-
-
Notifications
You must be signed in to change notification settings - Fork 199
Add a .postcss test in enablePostCssLoader #592
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
Comments
Hi @hawezo, Instead of adding a loader could you try doing the following? Encore.configureLoaderRule('css', loaderRule => {
loaderRule.test = /\.(postcss|css)$/,
}); If that works we could eventually add it automatically when |
Perfect :) If we add it automatically calling |
weaverryan
added a commit
that referenced
this issue
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
I'm not sure how to format this issue, but everything is explained in this ticket: vuejs/vetur#1330
Adding the following loader solves my issue:
I don't think I should have to add this manually. This loader is related to both
Vue
andPostCSS
, so maybe a new method would solve the problem.The text was updated successfully, but these errors were encountered: