Skip to main content
Clarifications
Source Link

I'm trying to compile vuetify 2.0.0-beta.9 SASS using laravel mix. The output of the styles.sass is an empty css file. How can I fix this?

As per the documentation (), First I ran:

$ npm install sass sass-loader fibers deepmerge --dev

Then created a main.scss file in resources/sass. Which contains the following:

@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

$body-font-family: 'Amiri', serif;

This produces a css file that seems incomplete because the styling of the site goes crazy while works fine if I just link a CDN or import a compiled one from ~vuetify/dist/vuetify.css

I need to compile it myself rather than just importing from ~vuetify/dist/vuetify.css because I want to change the $body-font-family variable.

To test, I first commented the styles.sass,

@import '~vuetify/src/styles/main.sass';
//@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

This confirmed that main.sass is being compiled. So next, I tried:

//@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

Which output a file with only the following:

/** Ripples */

/** Elements */

/** Ripples */

I'm trying to compile vuetify 2.0.0-beta.9 SASS using laravel mix. The output of the styles.sass is an empty css file. How can I fix this?

As per the documentation (), First I ran:

$ npm install sass sass-loader fibers deepmerge --dev

Then created a main.scss file in resources/sass. Which contains the following:

@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

$body-font-family: 'Amiri', serif;

I need to compile it myself rather than just importing from ~vuetify/dist/vuetify.css because I want to change the $body-font-family variable.

To test, I first commented the styles.sass,

@import '~vuetify/src/styles/main.sass';
//@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

This confirmed that main.sass is being compiled. So next, I tried:

//@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

Which output a file with only the following:

/** Ripples */

/** Elements */

/** Ripples */

I'm trying to compile vuetify 2.0.0-beta.9 SASS using laravel mix. The output of the styles.sass is an empty css file. How can I fix this?

As per the documentation (), First I ran:

$ npm install sass sass-loader fibers deepmerge --dev

Then created a main.scss file in resources/sass. Which contains the following:

@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

$body-font-family: 'Amiri', serif;

This produces a css file that seems incomplete because the styling of the site goes crazy while works fine if I just link a CDN or import a compiled one from ~vuetify/dist/vuetify.css

I need to compile it myself rather than just importing from ~vuetify/dist/vuetify.css because I want to change the $body-font-family variable.

To test, I first commented the styles.sass,

@import '~vuetify/src/styles/main.sass';
//@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

This confirmed that main.sass is being compiled. So next, I tried:

//@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

Which output a file with only the following:

/** Ripples */

/** Elements */

Source Link

Laravel mix compiling vuetify styles.sass to empty css file

I'm trying to compile vuetify 2.0.0-beta.9 SASS using laravel mix. The output of the styles.sass is an empty css file. How can I fix this?

As per the documentation (), First I ran:

$ npm install sass sass-loader fibers deepmerge --dev

Then created a main.scss file in resources/sass. Which contains the following:

@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

$body-font-family: 'Amiri', serif;

I need to compile it myself rather than just importing from ~vuetify/dist/vuetify.css because I want to change the $body-font-family variable.

To test, I first commented the styles.sass,

@import '~vuetify/src/styles/main.sass';
//@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

This confirmed that main.sass is being compiled. So next, I tried:

//@import '~vuetify/src/styles/main.sass';
@import '~vuetify/src/styles/styles.sass';

//$body-font-family: 'Amiri', serif;

Which output a file with only the following:

/** Ripples */

/** Elements */

/** Ripples */