Open ddewaele opened 10 years ago
The error
Uncaught TypeError: Cannot read property 'defaults' of undefined
grunt serve
grunt serve:dist
I added datatables and datatables-bootstrap3 to my bower.json file like this:
{ "name": "app", "version": "0.0.0", "dependencies": { "jquery": "~1.9.1", "datatables": "~1.9.4", "datatables-bootstrap3": "git@github:Jowin/Datatables-Bootstrap3.git", }, "devDependencies": {} }
And then had to modify my RequireJS config to add a shim for datatablesBootstrap3 :
require.config({ shim: { datatablesBootstrap3: { deps: ['datatables'] } }, paths: { datatables: '../bower_components/datatables/media/js/jquery.datatables', datatablesBootstrap3: '../bower_components/datatables-bootstrap3/BS3/assets/js/datatables', } });
As far as I understand, this shim config is for "scripts that do not express their dependencies via define()."
Without the shim I got the following runtime error:
Issue can be solved by applying https://github.com/Jowin/Datatables-Bootstrap3/pull/18/files
The error
grunt serve
.grunt serve:dist
)I added datatables and datatables-bootstrap3 to my bower.json file like this:
And then had to modify my RequireJS config to add a shim for datatablesBootstrap3 :
As far as I understand, this shim config is for "scripts that do not express their dependencies via define()."
Without the shim I got the following runtime error: