Skip to content

Commit

Permalink
build(style): support importing styles in Sass (#2555)
Browse files Browse the repository at this point in the history
* Support importing styles in SASS

This gives consumers more flexibility to manipulate the base CSS. For example, forcing the styles under a CSS layer

```scss
@layer third-party-libs {
  @import 'pkg:react-day-picker/styles.module';
}
```

Signed-off-by: George <[email protected]>

* Remove .css extension from sass export

Sass requires that CSS imports do not have the extension in the URL. Otherwise, it will be interpreted as a runtime import

---------

Signed-off-by: George <[email protected]>
  • Loading branch information
GeorgeTaveras1231 authored Oct 25, 2024
1 parent ced749e commit 6ea775b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"default": "./dist/cjs/locale.js"
}
},
"./style": {
"sass": "./src/style.css"
},
"./style.css": {
"style": {
"default": "./src/style.css"
Expand All @@ -65,6 +68,9 @@
"default": "./src/style.css"
}
},
"./style.module": {
"sass": "./src/style.module.css"
},
"./style.module.css": {
"style": {
"default": "./src/style.module.css"
Expand Down

0 comments on commit 6ea775b

Please sign in to comment.