Laravel Elixir with JQuery and JQuery UI Laravel Elixir with JQuery and JQuery UI laravel laravel

Laravel Elixir with JQuery and JQuery UI


Figured it out. jquery-ui, as is built and in npm doesn't contain a dist file. In order to solve this you have to use a file called jquery-ui-bundle. Run the following command npm i -S jquery-ui-bundle.

Then require it after jquery

require('jquery');require('jquery-ui-bundle');

Hope this saves someone some time, I spent a few hours figuring that out!


npm install jquery-ui-bundle --save

In your bootstrap.js add this:

window.$ = window.jQuery = require('jquery');window.$ = $.extend(require('jquery-ui-bundle'));

npm run dev


Three simple steps:

  1. Install npm package: npm i -S jquery-ui-bundle

  2. Import javascript (somewhere after jquery importing): require('jquery-ui-bundle');

  3. Import css styles: node_modules/jquery-ui-bundle/jquery-ui.css