You can compile files in resources/css
resources/js
with Laravel mix.
For myjs.js
, add to webpack.mix.js
file the line: mix.js('resources/js/myjs.js', 'public/js');
For mjcss.css
, add to webpack.mix.js
file the line: mix.postCss('resources/mycss.css', 'public/css');
Both myjs.js
and mycss.css
will be compiled to public/js and public/css respectively when you run npm run dev
Remember to include the minified js and css files in your app.blade.php
<script src="{{ asset('js/myjs.js') }}" defer></script>
<link href="{{ asset('css/mycss.css') }}" rel="stylesheet">
public
folder and then you can use theasset()
helper method to generate. E.g. in your blade file use,<img src="{{ asset('images/logo.png') }} />
– Akan