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

Hard-coded paths to Bootstrap dependencies cause failures with popular project structures #44

Closed
NetherGranite opened this issue Aug 12, 2021 · 1 comment
Labels
wontfix This will not be worked on

Comments

@NetherGranite
Copy link

This project's Sass contains hard-coded paths to Bootstrap's Sass, assuming it can be found in a node_modules folder in the root of the including module:

@import "node_modules/bootstrap/scss/functions";
@import "node_modules/bootstrap/scss/variables";
@import "node_modules/bootstrap/scss/mixins";

This fails under any other structure—e.g. as NPM 7 Workspaces, which has node_modules in a different location.

Is it possible to switch to the use of automatically-resolving imports/include directories so that the following can be used instead?

 @import "bootstrap/scss/functions"; 
 @import "bootstrap/scss/variables"; 
 @import "bootstrap/scss/mixins"; 
@apalfrey
Copy link
Owner

apalfrey commented Nov 1, 2021

I haven't used the npm workspaces yet, however it sounds like this could cause some compatibility issues with any project that's currently using this, meaning they'd have to change their compiler settings also...

However, someone did have an issue similar to this previously and submitted a pull request for it, which is part of the project: #4 Instead of importing the core SCSS file, you instead import select2-bootstrap-5-theme/src/include-all, with your correct location to Bootstrap before it.

@apalfrey apalfrey added the wontfix This will not be worked on label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants