-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): ensure Accordion works when consumers have enabled tree-s…
…haking We incorrectly caused `import "@u-elements/u-details"` to be tree-shaked when `@digdir/designsystemet-react` was used in an application with tree- shaking enabled. This happened because we bundled several dependencies (including this one) with our library, and our library has `"sideEffects": false`, implying that any side-effect imports that happened within our library folder was safe to remove. This was fixed by correctly marking all our dependencies as external, in which case the application's build will correctly identify `"@u-elements/u-details"`` as having side-effects and thus not remove the import. Closes #2477
- Loading branch information
Showing
4 changed files
with
28 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@digdir/designsystemet-react': patch | ||
--- | ||
|
||
Ensure Accordion works when consumers have enabled tree-shaking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters