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

[4.0.8] PostCss not applied to SCSS styles inside .vue components #1871

Closed
smcyr opened this issue Dec 15, 2018 · 2 comments
Closed

[4.0.8] PostCss not applied to SCSS styles inside .vue components #1871

smcyr opened this issue Dec 15, 2018 · 2 comments

Comments

@smcyr
Copy link

smcyr commented Dec 15, 2018

  • Laravel Mix Version: 4.0.8
  • Node Version: 10.13.0
  • NPM Version: 6.5.0
  • OS: Windows 10

Description:

If I have both SCSS and PostCSS inside a Vue component, just the scss is transpiled while the PostCSS is ignored.

Steps To Reproduce:

Add Scss and PostCSS to a .vue component:

<template>...</template>
<script>...</script>
<style lang="scss" scoped>
	.search-item {
		&.focus {
			@apply bg-grey-lighter;
		}
	}
</style>

With a simple mix config:

mix
	.setPublicPath('web/dist')
	.js('assets/scripts/main.js', 'scripts')
	.sass('assets/styles/main.scss', 'styles')
	.options({
		extractVueStyles: true,
		postCss: [
			require('tailwindcss')('./tailwind.js')
		]
	})
	.extract()
	.version();

The result:

.search-item.focus[data-v-94be9d9a] {
@apply bg-grey-lighter;
}

The expected result:

.search-item.focus[data-v-94be9d9a] {
background-color: #f1f5f8;
}
@smcyr smcyr changed the title [4.0.8] PostCss to applied to SCSS styles inside .vue components [4.0.8] PostCss not applied to SCSS styles inside .vue components Dec 15, 2018
@JeffreyWay
Copy link
Collaborator

Fixed on master. I'll tag it soon.

@smcyr
Copy link
Author

smcyr commented Dec 17, 2018

Thanks! I confirm that it's working now with 4.0.10.

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

2 participants