question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make w2ui compatible with CommonJS code

See original GitHub issue

It’d be great if the w2ui components get added in a modular, CommonJS pattern to be universally used. The current pattern assumes a global w2ui instance that map to a global jQuery object.

w2ui, w2obj and w2utils should be exposed on the root object, whatever it is (node, module, export, etc) instead of assuming it is being run in a global context.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
giladnocommented, Dec 29, 2016

I’ve created a pull request for this: https://github.com/vitmalina/w2ui/pull/1437

0reactions
mordonez-mecommented, Aug 27, 2015

Does this work? I am trying to use it like the example and it keeps saying “jQuery is not defined”, source: /Users/mordonez/repositories/chat/node_modules/requirejs/bin/r.js (392)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Utils: Overview | JavaScript UI - w2ui
It provides a common and uniform way for accessing created objects; It makes sure that you will not overwrite already created object (object...
Read more >
Using ES modules with CommonJS modules in Node.js
This is not meant to be a comprehensive overview of ES modules and CommonJS modules — I do not go into depth about...
Read more >
Awesome Javascript Overview
Duo (⭐3.4k) - Next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code...
Read more >
15 best alternatives to w2ui as of 2022 - Slant.Co
Get the answer to "What is the best alternative to w2ui? ... Apps developed with blocks.js are modular in structure and make use...
Read more >
Welcome to Everything.js | Everything.js
Code Splitting allows for loading parts of the application on demand. Through “loaders”, modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found