0

I'm a newbie in php / laravel / js libs world. I want to add require.js to my laravel 5.4 project, and some questions are come up.

First: What is the difference between these two lib: npm install requirejs / npm install laravel-elixir-requirejs? Which one should i use?

Second: What is this elixir for? Why does laravel 5.4 documentation not contain this elixir?

Thanks for the answers in advance!

1 Answer 1

1

Laravel Elixir provides a clean, fluent API for defining basic Gulp tasks for your Laravel application. Elixir supports common CSS and JavaScript pre-processors like Sass and Webpack. Using method chaining, Elixir allows you to fluently define your asset pipeline. It's more like micro framework for setting out the work flow and the second npm install requirejs means that npm will install .js where npm install laravel-elixir-requirejs is the js package specifically load js for elxir framework which is an component of laravel.

Sign up to request clarification or add additional context in comments.

2 Comments

Thx for the answer! :) May I ask that which one should I use (requirejs or laravel-elixir-requirejs) ? what is the best practice?
That's the choice you have to made.the best practice is to use laravel-elixir-requirejs.But the choice is your's

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.