Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Build error with webpack/sass-loader of modern Sass JS API #91

@taketo1113

Description

@taketo1113

When use webpack/sass-loader of modern Sass JS API, it raise build error with can't find a scss path of bootstrap package.

Steps to reproduce:

Can't find stylesheet to import.
  ╷
5 │ @import "node_modules/bootstrap/scss/functions";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  node_modules/select2-bootstrap-5-theme/src/select2-bootstrap-5-theme.scss 5:9  @import
  _path_/application.scss 12:9                                 root stylesheet
 @ ./_path_/application.scss
  • webpack: 5.94.0
  • sass-loader: 16.0.1
  • sass: 1.77.8

The following seems to fix the issue in webpack/sass-loader:

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions