Can I edit webpack.mix.js in laravel project?

Viewed 32

I have an HTML admin template file, but it has many js and css files. After installing laravel 8.x and auth with bootstrap ui (ui version v3.2), and then I change layouts like HTML templates. But I had error

Exception
Unable to locate Mix file: /assets/vendor/fonts/boxicons.css. (View: E:\Web\Laravel\StoreSystem\SMS\resources\views\layouts\sections\styles.blade.php)

For mix file change I read this blog: https://www.mikestreety.co.uk/blog/how-to-set-up-and-use-laravel-mix-with-your-project/ but there are no fonts and other css and js.

mix
    .sass('build/css/screen.scss', 'public/assets/css/style.css')
    .js('build/js/app.js', 'public/assets/js/app.js');

how can I use fonts and all js and css files of the vendor folder?

1 Answers

You would include the package inside of your app.js file e.g.:

import 'boxicons'

You need to do this for all of the libraries you want to compile via webpack/mix.

Related