Skip to content

fix: importing the project using modern CSS loaders#22

Open
tymees wants to merge 4 commits intodevelopfrom
fix/imports
Open

fix: importing the project using modern CSS loaders#22
tymees wants to merge 4 commits intodevelopfrom
fix/imports

Conversation

@tymees
Copy link
Copy Markdown
Collaborator

@tymees tymees commented Jul 14, 2025

I encountered an issue with more modern CSS loaders, in which importing from node_modules breaks completely. Instead, those expect that you import stuff as-if you're already in node_modules (effectively, that's what is happening...)

This PR changes the repo to remove all 'imports from node_modules', and makes sure the build process still works by emulating what those CSS loaders do.

EDIT: as a bonus, I included a fix for the GitHub actions workflow. The step versions used were too old. Technically, this should be a different PR, but I hope you don't mind it being included here?

@tymees tymees temporarily deployed to dev_environment July 14, 2025 08:16 — with GitHub Actions Inactive
@tymees tymees deployed to dev_environment July 14, 2025 08:16 — with GitHub Actions Active
Copy link
Copy Markdown

@XanderVertegaal XanderVertegaal left a comment

Choose a reason for hiding this comment

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

(100% fine with updating the build workflow in this PR, no worries.)

The changes themselves are fine, but I'm getting a million deprecation warnings when running the docs project. A few are simple typos (which can be ignored for now); others are deprecation warnings from Bootstrap, which we cannot solve (twbs/bootstrap#41512).

You can silence the latter by updating nuxt.config.ts:

    vite: {
        ...
        css: {
            ...
            preprocessorOptions: {
                scss: {
                    quietDeps: true,
                },
            },
        },
    },

You then see a few warnings that are genuinely from this project; I saw these pop up in VueLib as well. They are mostly about @import being replaced by @use and global built-in functions being deprecated.

You might want to address those in this PR as well since they seem to be linked to the SASS loader, but if you don't think they're a problem, that is fine too. Let me know in that case.

@tymees
Copy link
Copy Markdown
Collaborator Author

tymees commented Jul 21, 2025

No, those deprecation warnings are 100% caused by Bootstrap. See also this issue:
twbs/bootstrap#40962

And even if Bootstrap had already migrated to @use, that migration isn't a simple thing. So, I'd rather not do that as part of this PR

@XanderVertegaal
Copy link
Copy Markdown

Right, no problem :)

@mrholek
Copy link
Copy Markdown

mrholek commented Jul 27, 2025

We migrated our Bootstrap fork completely to Sass modules; you can see how to do it here - https://github.com/coreui/coreui

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.

3 participants