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

PostCSS not applied to CSS from CSS Modules composes #959

Closed
privatenumber opened this issue Aug 30, 2017 · 3 comments
Closed

PostCSS not applied to CSS from CSS Modules composes #959

privatenumber opened this issue Aug 30, 2017 · 3 comments

Comments

@privatenumber
Copy link

Version

12.2.2

Reproduction link

https://github.com/hirokiosame/vue-loader-css-modules-postcss

Steps to reproduce

PostCSS doesn't seem to be getting applied to the files that CSS Modules pulls in via composes. This seems to be happening because vue-loader applies the postcss plugins as a module instead of a webpack plugin.

What is expected?

For PostCSS plugins to be applied to the files CSS Modules imports via composes.

What is actually happening?

PostCSS is not being applied to the files CSS Modules imports via composes

In my reproduction link, I have a repo that contains a vue init webpack build with very minor changes. It comes with autoprefixer installed to postcss and it should be getting applied to every file, however, this shows that it's not getting applied to the files imported via CSS Modules.
screen shot 2017-08-29 at 8 28 39 pm


This loader entry in my webpack config has been a temporary fix:

{
	test: /\.css$/,
	enforce: 'pre',
	loader: 'postcss-loader',
	include: [
		importedFilePath,
	],
},
@privatenumber privatenumber changed the title PostCSS with CSS Modules composes PostCSS not applied to CSS from CSS Modules composes Aug 30, 2017
@Jinjiang
Copy link
Member

Yes, currently the pre postcss-loader you provided is the only way I have found to finish this job. I haven't found another way yet.

@privatenumber
Copy link
Author

This has been resolved to the new syntax changes in vue-loader 15

@fuguxu
Copy link

fuguxu commented Apr 26, 2021

This has been resolved to the new syntax changes in vue-loader 15

how to config it,in vue-loader 15 ?

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

No branches or pull requests

4 participants