I'm using Webpack in my application, in which I create two entry points - bundle.js for all my JavaScript files/codes, and vendors.js for all libraries like jQuery and React. What do I do in order to use plugins which have jQuery as their depen...
I am using the current stable release of both require.js and jQuery and I am currently including jQuery like this  requirejs.config({ paths: {     'jQuery': 'vendor/jquery', } });  require(['jQuery'], function(jQuery) {     lo...
I'm adding AMD support to a javascript library I develop.  This library may use jquery but it will still work if jquery isn't loaded.  When defining the module dependency there's a way to set a dependency as 'optional' so that if...
I have a single page Marionette app built on RequireJS which needs to support translations.  My goal is to have a dictionary file for each language, and based on the logged in user's configuration, load the relevant file.  Since most of the users...
We love RequireJS and AMD during development, where we can edit a module, hit reload in our browser, and immediately see the result. But when it comes time to concatenate our modules into a single file for production deployment, there apparently has...
I'm following the official documentation page about the topic but I cannot configure it to ignore .txt files.  I have a all.profile.js on the root of my project:  var profile = (function(){     return {         basePath: "./",         rel...
I'm wondering what is the proper approach for using RequireJS in a project with multiple modules, regarding performance of multiple require calls with less dependencies vs a single require with all the dependencies.  Let's take the case where...
I am using the following closure pattern to modularise my code:  (function(root) {   // MODULE CODE HERE    if (typeof module !== 'undefined' && module.exports) { // CommonJS      /* var dependencies = require(...) */     module.expor...
I try to make a non-AMD library loadable with dojo, I've chosen a separate folder as a new (pseudo) AMD-package and placed the files of that library in that folder, together with the main.js file, which will get loaded by convention by the dojo l...
How can I import a javascript AMD module into a external TypeScript module?  I'm modularizing my client TypeScript program to use AMD modules managed by bower. As part of this process, a Typescript module becomes a javascript AMD module, which I...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.