Skip to content

Commit

Permalink
Add bundled-only package exports for "browser" condition
Browse files Browse the repository at this point in the history
Update package exports and add `[browser]` and `[browser, import]` conditions to differentiate exports for Browserify and webpack v4
  • Loading branch information
colinrotherham committed Jul 11, 2023
1 parent 590bacf commit 35ae4e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ jobs:
conditions:
- [require]
- [import]
- [browser, require]
- [browser, import]

include:
- conditions: []
Expand Down
6 changes: 6 additions & 0 deletions packages/govuk-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
],
"exports": {
".": {
"browser": {
"sass": "./dist/govuk/all.scss",
"import": "./dist/govuk/all.bundle.mjs",
"require": "./dist/govuk/all.bundle.js",
"default": "./dist/govuk/all.bundle.js"
},
"sass": "./dist/govuk/all.scss",
"import": "./dist/govuk/all.mjs",
"require": "./dist/govuk/all.bundle.js",
Expand Down

0 comments on commit 35ae4e3

Please sign in to comment.