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

Fix bootstrap imports #1477

Merged
merged 4 commits into from
Feb 21, 2023
Merged

Fix bootstrap imports #1477

merged 4 commits into from
Feb 21, 2023

Conversation

SyntaxJoker
Copy link
Member

@SyntaxJoker SyntaxJoker self-assigned this Feb 20, 2023
@vercel
Copy link

vercel bot commented Feb 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tabler ✅ Ready (Inspect) Visit Preview Feb 21, 2023 at 1:07PM (UTC)

@codecalm
Copy link
Member

there is a bug with import stylesheet:

Error: Can't find stylesheet to import.
--
21:29:43.407 | ╷
21:29:43.407 | 1 │ @import "bootstrap/scss/functions";

@SyntaxJoker
Copy link
Member Author

@import 'node_modules/bootstrap/scss/root' will cause issues with monorepos that hoist dependencies up.
@import "~bootstrap/scss/root" will require the peer project to use sass-loader or something else that supports it
@import "bootstrap/scss/root" requires to add node modules to includePaths options

i used includePaths solution since it should resolve all reported issues

@rjd22
Copy link
Collaborator

rjd22 commented Feb 21, 2023

@SyntaxJoker thank you! This looks good to me 👍

Copy link
Collaborator

@kevinpapst kevinpapst left a comment

Choose a reason for hiding this comment

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

Thank you! I am using node-sass with webpack and these changes work without any required change on my end 👍

But I have one remark: we should use the same syntax everywhere.
There are at least three places where still @import "~ is used.
Could you adapt them as well @SyntaxJoker ?

@SyntaxJoker
Copy link
Member Author

Thank you! I am using node-sass with webpack and these changes work without any required change on my end 👍

But I have one remark: we should use the same syntax everywhere. There are at least three places where still @import "~ is used. Could you adapt them as well @SyntaxJoker ?

good point, i will change those imports aswell

Copy link
Collaborator

@kevinpapst kevinpapst left a comment

Choose a reason for hiding this comment

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

Thanks @SyntaxJoker 🚀

@codecalm codecalm merged commit 3ce568b into dev Feb 21, 2023
@codecalm codecalm deleted the dev-imports-fix branch February 21, 2023 13:38
kicaj added a commit to kicaj/tabler-webpack that referenced this pull request Feb 22, 2023
@kicaj
Copy link
Contributor

kicaj commented Feb 22, 2023

I confirm, thanks!

@kicaj
Copy link
Contributor

kicaj commented Feb 22, 2023

@codecalm @SyntaxJoker tabler/tabler-icons should have the same fix?

image

@SyntaxJoker
Copy link
Member Author

This is another issue, its caused by exports field
for now it can be fixed by importing tabler icons from icons-webfont like that: @tabler/icons-webfont/../tabler-icons.scss
we will be soon reworking the way library is being built and this will be fixed

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

Successfully merging this pull request may close these issues.

None yet

5 participants