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

Conversation

@Jarreddebeer
Copy link
Collaborator

No description provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line isn't necessary - rather add css as a dependency of the package to download - https://github.com/jspm/registry/blob/master/package-overrides/github/twbs/bootstrap%403.1.0.json#L5. Also is Bootstrap itself a dependency?

@guybedford
Copy link
Member

Thanks!

@cAhmad
Copy link

cAhmad commented Jun 7, 2016

Hi, they updated their project to match npm requierement.
The only override I needed to make the main lib works is:

"map": {
  "jquery": "@empty"
},

Because it brings jQuery from npm and I already had it from Github

But, importing a specific locale cause issue for me, I'm not able to make this works.

import 'bootstrap-datepicker';
import 'bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr.min';

When I bundle (SFX) my app it seems that the locale is called before the dapicker pluging is added to jQuery since I got this error:

bootstrap-datepicker.fr.min.js:2 Uncaught TypeError: Cannot read property 'dates' of undefined

I tried to add in my config.js

"meta": {
  "bootstrap-datepicker/dist/locales/bootstrap-datepicker.fr.min": {
    "deps": [
      "bootstrap-datepicker"
    ]
  },
}

It does not fix the issue.
I have [email protected], and it works almost (somtimes it's broken like 0.16.36) correctly with [email protected]

Any help or tips would be really appreciated.

May relates to uxsolutions/bootstrap-datepicker#1781 and jspm/jspm#1294

Edit: I finally manage to make it works!!

I had to add a shim, so the override looks like this:

"npm:[email protected]": {
  "map": {
    "jquery": "jquery"
  },
  "shim": {
    "dist/locales/*": {
      "deps": [
        "bootstrap-datepicker"
      ]
    }
  }
}

@guybedford
Copy link
Member

@cAhmad if you're able to share the above override with a new PR that would be great. Also the map: { 'jquery': 'jquery' } part shouldn't be necessary I think.

@cAhmad
Copy link

cAhmad commented Jul 11, 2016

Just submitted the PR.
Yeah the map: { 'jquery': 'jquery' } is not necessary when using jquery from npm.

@guybedford
Copy link
Member

Great thanks for coming back to this.

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.

3 participants