Laravel-mix: import css through app.scss

Created on 4 Mar 2017  路  3Comments  路  Source: JeffreyWay/laravel-mix

I'm trying to import css file through app.scss
@import "node_modules/bootstrap-rtl/dist/css/bootstrap-rtl.min.css";

after running npm run dev , the css file is not imported but the above line is printed in the output css file.

  • Laravel Mix Version: 0.8.8
  • Node Version : v6.10.0
  • NPM Version : 4.3.0
  • OS: win10

similar issue is posted here

Most helpful comment

Try changing it to:

@import "~bootstrap-rtl/dist/css/bootstrap-rtl.min.css";

If it's still not working, we need to see your webpack.mix.js file.

All 3 comments

Try changing it to:

@import "~bootstrap-rtl/dist/css/bootstrap-rtl.min.css";

If it's still not working, we need to see your webpack.mix.js file.

not working!
webpack file:

```
const {mix} = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.options({
processCssUrls: false
})
.extract(['jquery','vue','axios','bootstrap-sass','lodash'])
.browserSync('sherkat.dev')
.disableNotifications();

You set processCssUrls to false, which means Mix will ignore those.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdebacker picture sdebacker  路  3Comments

RomainGoncalves picture RomainGoncalves  路  3Comments

rderimay picture rderimay  路  3Comments

Bomavi picture Bomavi  路  3Comments

hasnatbabur picture hasnatbabur  路  3Comments