Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirejs Removed #66

Closed
ShlomoCode opened this issue Jun 1, 2022 · 3 comments
Closed

requirejs Removed #66

ShlomoCode opened this issue Jun 1, 2022 · 3 comments

Comments

@ShlomoCode
Copy link
Contributor

ShlomoCode commented Jun 1, 2022

in https://docs.nodebb.org/development/plugins/libraries/
(https://github.com/NodeBB/docs/blob/master/src/docs/development/plugins/libraries.md):

From your client-side scripts, you can then load the jQuery module via require.js as follows:

require(['jquery'], function ($) {
   $('.someClass').addClass('someotherclass');
});

This is while requirejs has been deprecated by NodeBB 2.0...

@barisusakli
Copy link
Member

The require(['modulename']) syntax still works in webpack

cd53d3f

@ShlomoCode
Copy link
Contributor Author

@barisusakli
CleanShot 2023-02-14 at 00 26 10@2x

@pitaj
Copy link
Contributor

pitaj commented Feb 13, 2023

It doesn't work in the browser console (or in custom JavaScript in the ACP), but it does work when the scripts are added to your plugin.json and processed by our build system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants