Skip to content

Commit

Permalink
Bugfix. Properly set exports value in package.json
Browse files Browse the repository at this point in the history
Otherwise the following error appears when importing from Strophe:
```
Module not found: Error: Package path . is not exported from package
```

From what I can tell looking at the documentation (https://webpack.js.org/guides/package-exports),
the previous values are invalid since they don't start with a `.`, so I removed them.

Leaving them in also caused this error:
```
Module not found: Error: Exports field key should be relative path and start with "." (key: "node")
```
  • Loading branch information
jcbrand committed May 7, 2024
1 parent a915056 commit d4e9996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Strophe.js Change Log

## Version 3.0.1 - (Unreleased)

* Bugfix: `Package path . is not exported from package`

## Version 3.0.0 - (2024-05-07)

* #704 Cannot use with NodeJS
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@
"module": "dist/strophe.esm.js",
"unpkg": "dist/strophe.umd.min.js",
"exports": {
"node": {
"import": "./dist/strophe.esm.js",
"require": "./dist/strophe.common.js"
}
".": "./src/index.js"
},
"scripts": {
"types": "tsc",
Expand Down

0 comments on commit d4e9996

Please sign in to comment.