Unable to get working with RequireJS
See original GitHub issueI am using the latest version 2.5.1 with requireJS. But it always give me undefined function error. Below is my configuration:
paths: {
jquery: 'js/libs/jquery/jquery-2.1.1',
'query-builder': 'js/libs/QueryBuilder/js/query-builder',
'doT': 'js/libs/QueryBuilder/js/doT',
'jquery.extendext': 'js/libs/QueryBuilder/js/jQuery.extendext'
},
shim: {
'jquery.extendext': {
deps: ['jquery'],
exports: 'jquery.extendext'
},
'doT':
{
deps: ['jquery'],
exports: 'doT'
},
'query-builder': {
deps: ['jquery','jquery.extendext','doT'],
exports: 'jquery.fn.queryBuilder'
}
}
Below is my calling on page
define([
'jquery',
'underscore',
'backbone',
'jquery.extendext', 'doT', 'query-builder',
'bootstrap',
], function ($, _, Backbone) {
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Common Errors - RequireJS
The path configuration for a module is incorrect. Check the "Net" or "Network" tab in the browser's developer tools to see if there...
Read more >require.js is not loading any modules - Stack Overflow
I am trying to load a module using require.js, and I have the following ... Is require.js silently failing on loading some submodule...
Read more >Moodle in English: What is RequireJS doing?
I am having trouble getting a javascript library that worked up until 2.8, work on 2.9. It is a whiteboard called literallycanvas that...
Read more >Require.js fails to load due to bad syntax - Qlik Community
js from an external app. I've try loading it both via CommonJS and AMD. Either way I get an error that says: Loading...
Read more >Unable to get Buttons 1.3.2 to work with require JS and ...
I've been using DataTables, with the Responsive extension, for some time now and was recently asked to add some buttons that would allow ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You should not need the shims, everything is well defined in the loader : https://github.com/mistic100/jQuery-QueryBuilder/blob/master/dist/js/query-builder.js#L8
Probably the key for doT in
paths
must bedot/doT
. And in you app itself, just requirequery-builder
unless you use doT and extendext yourselfClosing the issue.