Laravel app.js and app.css why need to use ? Can we removed those?

12,661

Solution 1

You can delete them, read the following lines:

CSS

Laravel Elixir provides a clean, expressive API over compiling SASS or Less, which are extensions of plain CSS that add variables, mixins, and other powerful features that make working with CSS much more enjoyable.

In this document, we will briefly discuss CSS compilation in general; however, you should consult the full Laravel Elixir documentation for more information on compiling SASS or Less.

JavaScript

Laravel does not require you to use a specific JavaScript framework or library to build your applications. In fact, you don't have to use JavaScript at all. However, Laravel does include some basic scaffolding to make it easier to get started writing modern JavaScript using the Vue library. Vue provides an expressive API for building robust JavaScript applications using components.

Complete Reference

Solution 2

Laravel default CSS and JS files are safe to remove.

However, these styles will be used in the following places by default, so please be taken care of it.

  1. Default Welcome page
  2. Laravel auth pages
  3. Default error page

If you are using custom themes or your own styles, you can use Laravel Elixer to compile them and which will create app.css for style files and app.js for javascript related files.

https://laravel.com/docs/5.3/elixir

https://laravel.com/docs/5.3/frontend

Share:
12,661
MD Ashik
Author by

MD Ashik

Focused and skilled Software Engineer Front End, Offering 3+ years of experience in modern web development technologies. Have a clear vision of progressing with a good organization where I can contribute my present expertise and expand my knowledge.

Updated on June 21, 2022

Comments

  • MD Ashik
    MD Ashik almost 2 years

    I am new learner on Laravel.

    I am using Laravel 5.3.But I want Use Bootstrap css and Js. But Laravel have default app.css and app.js. Hare app.css actually Bootstrap CSS and also app.js work like Bootstarp js. But can i delete app.js and app.css and can i use custom version Bootstrap CSS & JS ?

    So I need to know why we will be use this two files ?