I am using Tailwind CSS in Laravel with VueJS component like this.
<template>
</template>
<script>
</script>
<style lang="postcss" scoped>
.day-disabled {
@apply text-gray-400;
}
</style>
However it is complaining that
Module parse failed: Unexpected token (685:0)
File was processed with these loaders:
* ./node_modules/vue-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|
|
> .day-disabled {
|
| @apply text-gray-400;
Is there anyway to use @apply
directive in VueJS component using Laravel Mix. This is my webpack.mix.js
const mix = require('laravel-mix');
mix.options({ extractVueStyles: true})
.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('postcss-nested'),
require('postcss-custom-properties'),
require('autoprefixer')
]);
Is there anyway to resolve this issue.
.day-disabled
not@apply
– Tourerrequire('postcss-apply')
in your mix option? – Tourer