Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Fix directories and jquery in bootstrap 4 #916

Closed
wants to merge 1 commit into from

Conversation

jakeNiemiec
Copy link

  • Bootstrap 4 is incompatible with jquery 3+
  • Set lib to . so that sass files are installed

Test using this repo: https://github.com/jakeNiemiec/jspm_bootstrap

- Bootstrap 4 is incompatible with jquery 3+
- Set lib to . so that sass files are installed
@guybedford
Copy link
Member

We can't change the existing github override because that would be a breaking change. Rather approach we can make to not force a breaking path is to make npm:bootstrap version work as the main repo for bootstrap in jspm and change to that.

What exactly is not working with npm:bootstrap? What is the error? Let's fix it.

@jakeNiemiec
Copy link
Author

jakeNiemiec commented Jun 17, 2016

@guybedford It is broken right now, bootstrap@4.0.0-alpha.2 requires jquery below 3.0.0.
Using this as an example https://github.com/jakeNiemiec/jspm_bootstrap .

For this example we are simply importing bootstrap https://github.com/jakeNiemiec/jspm_bootstrap/blob/master/src/index.js#L2
image

Desired outcome:

image

Everything loaded. Notice that jquery was properly included on the page, and exported within bootstrap.

Lets try jspm i npm:bootstrap@4.0.0-alpha.2

image

Jquery no longer gets properly exported, it is loaded on the page after index.js executes (this is beyond the scope of my understanding).

Lets assume the user will try to install or include jquery to fix this according to the error jspm i jquery

image
image
😞 same error

At this point lets assume the user know that they need to override the format in the loaded jquery

image

image

This is due (in part) to "github:twbs/bootstrap@4.0.0-alpha.2" > "dependencies" > "jquery": "*",

@jakeNiemiec
Copy link
Author

SO question reporting this problem http://stackoverflow.com/q/37823898/6091685

@guybedford
Copy link
Member

@jakeNiemiec thanks I've updated the Bootstrap override so that it uses jquery 2! It seems the jquery update broke a lot of packages (potentially all the places we have jquery: '*' actually). We did that to support jquery 1 and 2 at the same time, but it seems that has backfired. I'm wondering if it is worth just going through and bulk updating all jquery: '*' overrides to jquery: '2'...

For Bootstrap, you're points are completely valid, but I've just made too many breaking override changes in the past and it's not fun breaking peoples' projects. So I'd really appreciated if we can focus on getting the npm override to work.

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

Successfully merging this pull request may close these issues.

2 participants