NPM packages do not load styling

NPM packages do not load styling

Gustavo_47Gustavo_47 Posts: 2Questions: 1Answers: 0

Hi,
I am using datatables in an electron app but the npm packages are not loading the css data. When I load datatables via the CDN the styles are there. Curiously, when I run the datatables debugger I get a 'jQuery is not loaded error' even though the table successfully works.

JS:

const $ = require('jquery')
require('datatables.net-dt')(window, $);
$(function () {
    $('#testTable').DataTable();
});

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,179Questions: 1Answers: 2,590
    Answer ✓

    These two threads (here and here) should help, they're discussing loading the packages,

    Colin

  • Gustavo_47Gustavo_47 Posts: 2Questions: 1Answers: 0

    Thanks, directly importing the css files worked.

Sign In or Register to comment.