Skip to content

Commit

Permalink
fix: add bs-datepicker.css file to package.json exports
Browse files Browse the repository at this point in the history
This PR enables importing "bs-datepicker.css" file when using Yarn with PnP. When declared, the "exports" field in a package.json is meant to conceal and exclude all unspecified files or directories. Until now the exclusion of "bs-datepicker.css" wasn't an apparent issue because no other package manager/strategy is able to enforce disallowing importing files not specified in the "exports" field but Yarn with PnP enforces it.

https://nodejs.org/api/packages.html#packages_exports
https://github.com/jkrems/proposal-pkg-exports/
https://angular.io/guide/creating-libraries#managing-assets-in-a-library

fixes #6449
  • Loading branch information
Shlomo Morosow authored and Shlomo Morosow committed Apr 5, 2022
1 parent 6be9fc4 commit a89d89d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
"node": "./datepicker/fesm2015/ngx-bootstrap-datepicker.mjs",
"default": "./datepicker/fesm2020/ngx-bootstrap-datepicker.mjs"
},
"./datepicker/bs-datepicker.css": {
"style": "./datepicker/bs-datepicker.css"
},
"./dropdown": {
"types": "./dropdown/ngx-bootstrap-dropdown.d.ts",
"esm2020": "./dropdown/esm2020/ngx-bootstrap-dropdown.mjs",
Expand Down

0 comments on commit a89d89d

Please sign in to comment.