0

I am working on a project and I have a couple of views.

I am using the included bootstrap from laravel but in the resources/sass/_variables.scss I changed some of the default colors.

After that, I ran npm run dev to recompile.

After that I checked public/css and there were css files for every view that I created.

Is it possible that laravel mix generated these files?

Also, is it possible to edit these without laravel mix overriding your changes?

webpack.mix.js

let mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.react('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css');

2
  • 1
    please add your webpack.mix file Commented Nov 19, 2018 at 10:29
  • @FatemehMajd i added it to the bottom of the question Commented Nov 19, 2018 at 10:34

1 Answer 1

1

This is exactly what laravel mix is supposed to do. You shouldn't edit the built css files directly. You can find the app.scss file in resources/sass and edit that or if you, for some reason, want to create a css file directly to your public/css directory you can do that too. If you don't use the same file names, mix won't overwrite your files.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.