A
A
Alexander Pankov2018-09-12 18:57:35
npm
Alexander Pankov, 2018-09-12 18:57:35

How to work with frontend in Laravel Mix?

Hello. i installed laravel
, ran npm install, ran npm run dev
, my files were compiled according to the standard paths, everything is
ok
package.json, ok
I go to resources/js/bootstrap.js and write require('fullpage.js');
I run npm run dev again and in my public/js/app.js file I get something similar to the code of this IB
library, how do I correctly include its styles so that everything I need appears in the public/css/app.css file?
i just typed in resources/sass/app.scss import "~fullpage.js/dist/fullpage.css";
did I do everything right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2018-09-12
@modestguy

You can use mix.styles after you process saas. Then mix will merge everything into one final file.

mix.styles([
        "libs/bootstrap4/css/bootstrap.css",
        "libs/font-awesome/css/font-awesome.css",
        "css/domain.css"
    ],
    'public/css/app.css',
    'resources/assets');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question