javascript - Define the order of require in Laravel-mix/Webpack -
i'm having trouble adding summernote npm. want use npm of js , css files in 1 file. unfortunately, have not been able summernote work when add in laravel-mix , webpack. know works when add script link in main.blade.php
. problem jquery @ end of app.js
file, need summernote last.
webpack.mix.js
mix.js([ 'resources/assets/js/app.js', // tried add new file summernote required // last package in app.js no luck. //'resources/assets/js/summernote.js' ], 'public/js');
assets/js/app.js
require('./bootstrap'); // menu require('./sidebar.js');
./bootstrap
window._ = require('lodash'); /** * we'll load jquery , bootstrap jquery plugin provides support * javascript based bootstrap features such modals , tabs. * code may modified fit specific needs of application. */ window.$ = window.jquery = require('jquery'); // packages require('bootstrap-sass'); require('owl.carousel'); require('perfect-scrollbar/jquery')(window.$); require('datatables.net-bs'); require('codemirror'); require('summernote'); require('select2'); // set global options select2 $.fn.select2.defaults.set("theme", "bootstrap");
i know version of jquery, bootstrap etc working not problem. need summernote js code underneath jquery...
Comments
Post a Comment