Open thektan opened 2 years ago
Hey @thektan! Thanks for opening this. How urgent is this need? We can fit it in at some point, but just want to get an idea of how soon we need to work on it.
Hi @bryceosterhaus! I was able to write a basic $ref
resolver which works for simple paths in the same file. It works for our use case at the moment so this is not as urgently needed anymore.
It'd still be helpful to eventually use this library to resolve references to other files so we could organize and reduce duplicated schema, but I'd say this not as important anymore.
@thektan good to know! Let us know if/when this becomes more urgent. We will keep this in our backlog and hope to address it soon, however we are working on some new build and bundle processes and we may not need node shims in the future, so its possible this may resolve itself with new techniques.
Issue type (mark with
x
)Description
I previously created a thread in #t-dxp-frontend-infra here: https://liferay.slack.com/archives/CNBG06JS3/p1648595258944989
I'm trying to add a third-party dependency
@apidevtools/json-schema-ref-parser
(https://github.com/APIDevTools/json-schema-ref-parser) to traverse a JSON schema for autocompletion in a code editor. The package usesrequire('http')
andrequire('https')
. In portal I get errors of missing dependency:A github issue (https://github.com/APIDevTools/json-schema-ref-parser/issues/254#issuecomment-1049481948) about these missing packages resolves this issue by adding polyfills
stream-http
andhttps-browserify
using thewebpack.config.js
configuration:Desired behavior: Can something similar to the webpack.config.js be done (or supported if it doesn't exist) to resolve the missing dependencies?
Current behavior: Unable to resolve the missing node
http
andhttps
dependencies to use the@apidevtools/json-schema-ref-parser
package.