In general, add ESM CJS library in standalone 5.x #964
Unanswered
cristianvogel
asked this question in
Answers & Questions
Replies: 1 comment 1 reply
-
|
what didn't work when simply adding this via op-dependencies? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I know its a pain, but it works well for older CJS libs.
So I am trying to get
https://www.npmjs.com/package/bonjour-servicein to my patch.I have grabbed the source code locally. I have tried building with WebPack....
"build:webpack": "webpack --config webpack.config.js"a config like this
and get a js file out successfully.
bonjour-service.cjs.jsnice.
In Cables 5.2.0 I can import it using the CommonJS add. No problem.
But in my op code, it fails.
I am trying to import like this
const bonjour = op.require('bonjour-service.cjs.js');This is the Cables console error log.
Beta Was this translation helpful? Give feedback.
All reactions