Neeraj1005
2 months ago
722
20
General

Admin-lte installation and setup through npm

Posted 2 months ago by Neeraj1005

In my project I have installed admin-lte package. for some simple pages it working but in case of datatables the datable plugins is not working. can anyone tell me how can I solve this? or how can I add multiple plugins

This is webpack.mix.js

This is my webpack max
const mix = require('laravel-mix');


mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

mix.scripts([
    'node_modules/plugins/jquery/jquery.min.js',
    'node_modules/plugins/bootstrap/js/bootstrap.bundle.min.js',
    'node_modules/plugins/datatables/jquery.dataTables.min.js',
    'node_modules/admin-lte/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js',
    'node_modules/admin-lte/plugins/datatables-responsive/js/dataTables.responsive.min.js',
    'node_modules/admin-lte/plugins/datatables-responsive/js/responsive.bootstrap4.min.js',

], 'public/js/all.min.js');

This is bootstrap.js

try {
    window.Popper = require('popper.js').default;
    window.$ = window.jQuery = require('jquery');

    require('bootstrap');

    // AdminLTE code here.
    require('admin-lte');
} catch (e) {}

THis is app.scss

// Fonts => Not needed because it is define below in admin-lte
// @import url('https://fonts.googleapis.com/css?family=Nunito');

// Variables
@import 'variables';

// Bootstrap
// @import '~bootstrap/scss/bootstrap';


// admin-lte

@import "~admin-lte/dist/css/adminlte.min.css";
@import "~admin-lte/plugins/fontawesome-free/css/all.min.css";

after this I run npm run watch but in datatable I did not get the table filters

Please sign in or create an account to participate in this conversation.