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

How to enable SASS support in specific cases #111

Open
mithenks opened this issue Feb 16, 2022 · 0 comments
Open

How to enable SASS support in specific cases #111

mithenks opened this issue Feb 16, 2022 · 0 comments
Assignees

Comments

@mithenks
Copy link

Issue in /src/pages/tutorials/basic-modifications/enable-sass-less/index.md

While trying to enable SASS support in a magento PWA studio project, I have experienced the following issues:

  • node-sass package is deprecated, I've used sass package instead
  • sass-loader package require webpack > 5 in newer versions; if magento pwa studio project use webpack 4.x, I've use sass-loader@10 package
  • with previous packages, the localIdentName option is not supported in webpack.config.js

To summarize, in order to enable SASS support we need to:

  1. run yarn add --dev sass sass-loader@10
  2. add the following configuration in webpack.config.js
config.module.rules.push({
        test: /\.s[ca]ss$/,
        use: [
            'style-loader',
            {
                loader: 'css-loader',
                options: {
                    modules: true,
                    sourceMap: true,
                }
            },
            'sass-loader'
        ]
    });

I think it could be useful to report this information in the documentation.

@hguthrie hguthrie moved this to 🆕 Ready for Grooming in Commerce - Issues Dec 15, 2022
@dobooth dobooth moved this from 🆕 Ready for Grooming to 🔖 Ready for Development in Commerce - Issues Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready for Development
Development

No branches or pull requests

2 participants