Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marcstober
marcstober / jquery-datatables-webpack
Last active October 9, 2020 07:35 — forked from jrunestone/jquery-datatables-webpack
DataTables.net with webpack
Here's how to make jQuery DataTables work with npm and webpack. This is the simplest way I found to do it.
See the previous revision of this gist for a way to do it with forcing AMD to be disabled if you need that.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-dt
Then to initialize DT in your app, do this in your main entry point:
// you can use import or require
import dt from 'datatables.net';