Skip to content

[v10] feat: support sass embedded #1152

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

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

mistic
Copy link

@mistic mistic commented Jul 25, 2023

When trying to update the sass engine from the legacy node-sass into the new ones we found that users using webpack v4 doesn't have the ability to use the new sass-embedded implementation as the sass-loader version that supports it doesn't work with webpack v4. This is a good addition because using the javascript sass only implementation has big performance penalties.

@mistic mistic requested a review from alexander-akait July 25, 2023 02:29
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 25, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: mistic / name: Tiago Costa (0053aa9)

@alexander-akait
Copy link
Member

Release will be tomorrow, thank you

@mistic
Copy link
Author

mistic commented Aug 7, 2023

Thank you @alexander-akait !

@mistic mistic merged commit 47e9814 into webpack-contrib:v10 Aug 7, 2023
@mistic
Copy link
Author

mistic commented Aug 9, 2023

@alexander-akait are we going to release this today? 😃

@sebbayer
Copy link

@mistic I think the part about sass-embedded is missing in the try/catch block of getDefaultSassImplementation in src/utils.js. Otherwise it will never check if that package is installed. Taken from branch master:

  try {
    require.resolve("sass");
  } catch (ignoreError) {
    try {
      require.resolve("node-sass");
      sassImplPkg = "node-sass";
    } catch (_ignoreError) {
      try {
        require.resolve("sass-embedded");
        sassImplPkg = "sass-embedded";
      } catch (__ignoreError) {
        sassImplPkg = "sass";
      }
    }
  }

When I only install latest sass-embedded with sass-loader 10.5.0 in my project, I get the error:

Cannot find module 'sass'
Require stack:

  • node_modules/sass-loader/dist/utils.js
    ...

@mistic
Copy link
Author

mistic commented Dec 16, 2023

@sebbayer you're right, I've missed that part. Fix at #1170

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