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

jQuery duplicated by bootbox when require("bootbox") is used. #524

Closed
LordSyntax opened this issue Jul 12, 2016 · 4 comments
Closed

jQuery duplicated by bootbox when require("bootbox") is used. #524

LordSyntax opened this issue Jul 12, 2016 · 4 comments

Comments

@LordSyntax
Copy link

LordSyntax commented Jul 12, 2016

I am using Bootbox under Node:

  "dependencies": {
    "bootbox": "^4.4.0",

My project is an Ampersand Single Page App, which uses Moonboots.

Moonboots defines the non-common js libraries, which causes them to be written out at the top of the compiled/unified javascript file which is distributed to the client.

libraries: [
            __dirname + '/node_modules/jQuery/dist/jquery.js',
            __dirname + '/node_modules/bootstrap/dist/js/bootstrap.js'
        ],

The problem that I am seeing is that when I wish to use bootbox in my ampersand-view pages using require("bootbox"), it causes the jQuery library to be written a second time in the javascript file (which causes problems with jQuery defines, making bootbox think bootstrap isn't installed).

If I remove the require("bootbox") call, then jQuery is only included once (as expected).

I assume this has something to do with module.exports = factory(require("jquery")); in bootbox.js, but truthfully am not sure, because I am not an advanced Node and Bootstrap developer.

@LordSyntax
Copy link
Author

Possibly related to the following issues, given their proximity in bootbox.js

// @see https://github.com/makeusabrew/bootbox/issues/180
// @see https://github.com/makeusabrew/bootbox/issues/186

@tiesont
Copy link
Member

tiesont commented Jul 12, 2016

@LordSyntax You can reference another issue simply by using the issue number, preceded by a pound sign, like so: #180

@makeusabrew
Copy link
Collaborator

Should be fixed by the merge of #436 - feel free to test against master, or otherwise will make it into 4.4.1

@djmattyg007
Copy link

When will v4.4.1 be released? It seems like there's a few important bugfixes waiting.

@tiesont tiesont closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants