Closed justin808 closed 8 years ago
Yes, this tool is so cool and useful, and I am eagerly waiting for the new version that supports the awesome Bootstrap 4.0. Hope we can use it as soon as possible :+1:
@lukeqi Feel free to create a PR or advise me on what changes are needed.
I have created a fork of this package that supports Bootstrap 4:
github: https://github.com/markusjwetzel/bootstrap-v4-webpack npm: https://www.npmjs.com/package/bootstrap-v4-webpack
Since Bootstrap switched from Less to Sass, there is no extra Bootstrap 4 Sass package. So it might be the best solution to integrate my fork into bootstrap-webpack someday when Bootstrap 4 is officially released. What do you think?
@markusjwetzel There is no way to file issues on your repo, but the peerDependencies
(bootstrap@twbs/bootstrap#v4-dev
) are incompatible with the version of bootstrap that is installed (bootstrap@4.0.0-alpha
). I'm not sure how you installed bootstrap, but what you have it not working for me.
@markusjwetzel Please let me know how close this is being ready to merge. If it's close, I'll try to take a look at this in the next few days.
I have enabled issues for my repository and changed back bootstrap peer dependency to "bootstrap": "*"
. Please let me know if it works for you now. @maxbates
Think the *
syntax is wrong: https://docs.npmjs.com/files/package.json#peerdependencies
Also note (I believe) specifying ^4
won't work because it's alpha
@maxbates I am pretty sure that the syntax is not wrong. It works for me with these two lines in my packages.json
:
"bootstrap": "twbs/bootstrap#v4-dev",
"bootstrap-v4-webpack": "^1.0.1",
So I think you must do something wrong. Are you sure that you have installed bootstrap v4 correctly? I think that bootstrap v4 is not on npm yet. That's why I use the github repo branch "twbs/bootstrap#v4-dev"
instead.
@justin808 Yes, it should be ready. As I said I am not sure whether it is a good idea or not to merge it with this repo, but that's up to you. :)
npm (v 2.14.4) log reads:
npm ERR! peerinvalid The package bootstrap@4.0.0-alpha does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer bootstrap-v4-webpack@1.0.1 wants bootstrap@*
When installing bootstrap@twbs/bootstrap#v4-dev
, even if it appears as such in package.json, the version is still registered as bootstrap@4.0.0-alpha
I am running npm install bootstrap@twbs/bootstrap#v4-dev
We're going to merge this within the next day or so. Looks great!
We'll add one more setting in the config file:
bootstrapVersion: < 3 or 4 >
Here's the PR: https://github.com/shakacode/bootstrap-sass-loader/pull/38
CC: @alexfedoseev, as he's going to take a look at this in about 12 hours and do some general refactoring to make the loader work with both, PLUS support CSS modules: https://github.com/shakacode/bootstrap-sass-loader/issues/36
@markusjwetzel Please get in touch with us at either justin@shakacode.com or alex@shakacode.com if you want to join our slack room and possibly pair on these changes. @alexfedoseev is in Moscow time, which is closer to you. Thanks again for figuring this out!
@maxbates npm install bootstrap@twbs/bootstrap#v4-dev
works for me. I don't know how you have managed to install bootstrap@4.0.0-alpha
as there is no such version on npm. I am sorry, but I don't have any more ideas to solve your problem.
@justin808 This repo and my repo/pull request have different peer dependencies (bootstrap-sass
vs bootstrap
). And I guess they will even have different ones after the official release of bootstrap 4, because bootstrap will very likely put v4 sass files into the bootstrap
package.
So it is done by just adding one more setting bootstrapVersion: < 3 or 4 >
. Do you have a solution for this? What about creating a new repo shakacode/bootstrap-loader or someting like this for bootstrap 4?
WIP: https://github.com/shakacode/bootstrap-loader/pull/1 Feel free to comment.
FYI -- we'll soon be transitioning to the name bootstrap-loader and the new loader which supports CSS modules and Bootstrap 3 & 4: https://github.com/shakacode/bootstrap-loader/pull/1.
@alexfedoseev I think we're ready. Closing this issue and opening a new one with the migration checklist.
Example implementation here: https://github.com/shakacode/react-webpack-rails-tutorial/pull/175
Right now, we only support Bootstrap 3.x.
This is issue is opened to track what's needed for Bootstrap 4.x support.