I'm having a problem with laravel mix about adding new scss or js
What is the best practice to add custom scss or js in laravel start kit?
ex.
I have a page
view - resources/view/page/homepage.blade.php
scss - <where>/page/homepage.scss
js - <where>/page/homepage.js
Hi James,
Sure, here is a better answer:
The best practice to add custom SCSS or JS in Laravel Start Kit is to use the `addJavascriptFile()` function. This function takes a path to a JavaScript file as its argument. For example, to add the file `assets/js/custom/authentication/sign-in/general.js`, you would use the following code:
addJavascriptFile("assets/js/custom/authentication/sign-in/general.js");
addCssFile("assets/scss/custom/authentication/sign-in/general.scss");
app/Http/Controllers/Auth/AuthenticatedSessionController.php
app/Core/Bootstrap/BootstrapDefault.php