We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
package.json
bugs.url
1 parent 5137325 commit d19841bCopy full SHA for d19841b
README.md
@@ -109,6 +109,28 @@ throw new ExampleError('...', {
109
})
110
```
111
112
+## Using `package.json`
113
+
114
+```json
115
+// package.json
116
+// See https://docs.npmjs.com/cli/configuring-npm/package-json#bugs
117
+{
118
+ ...
119
+ "bugs": {
120
+ "url": "https://github.com/my-name/my-project/issues"
121
+ },
122
123
+}
124
+```
125
126
+```js
127
+import packageJson from '../../package.json' with { type: 'json' }
128
129
+export const UnknownError = BaseError.subclass('UnknownError', {
130
+ bugs: packageJson.bugs.url,
131
+})
132
133
134
# Related projects
135
136
- [`modern-errors`](https://github.com/ehmicky/modern-errors): Handle errors in
0 commit comments