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

feat: extend conditionNames #1092

Merged
merged 2 commits into from Oct 6, 2022

Commits on Oct 5, 2022

  1. feat: extend conditionNames

    This allows consumers to set their own considitionNames and have sass pick this up.
    
    Examples:
    
    Supporting a single entrypoint but targeting multiple themes
    ```scss
    @use 'my-design-tokens';
    
    .class {
      color: my-design-tokens.$color-1
    }
    ```
    
    package.json
    ```json
    {
      "name": "my-design-tokens",
      "exports": {
          ".": {
            "sass": {
              "theme1": "./path-to-theme1.scss",
              "theme2": "./path-to-theme2.scss"
              }
          }
       }
    }
    ```
    Webpack config
    ```
    module.exports = {
      resolve: {
        conditionNames: [someFlag ? "theme1" : "theme2", "..."]
      }
    }
    ```
    GeorgeTaveras1231 committed Oct 5, 2022
    Copy the full SHA
    eaef60d View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2022

  1. Copy the full SHA
    ec88eef View commit details
    Browse the repository at this point in the history