ngx-markdown
ngx-markdown copied to clipboard
marked should be peerDependency
In our app we use both ngx-markdown and marked (plain version).
When we import plain marked, it makes marked.esm.js appear 2 times in our bundle. Please move the "marked" to peerDependency of your package.json.
See here the screen shot from webpack-bundle-analyzer

You might consider moving all deps to peerDeps. lib should not have deps.
This is something I am considering but as it is a breaking change, it will require to wait for the next major release planned for Angular 15.
hi @jfcere ! thanks for the replay! I don't understand why this would be considered breaking. Anybody who would update to latest patch version would also automatically be prompted to install any peer dep, no code change would be necessary.
It is a breaking change because it means that anybody who update the library would need to do manual changes to add dependencies to their package.json because they would no longer be automatically included.
Some people use tools in their CI, such as Renovate, that automatically update dependencies... they would be impacted by that change.
Thanks for the PR, I moved all dependencies to peer dependencies in a beta version that is only available if manually updated in anticipation of the next major version that I will officially release at the same time as Angular 15.
You can update ngx-markdown using the command below and of course, install your required peer dependencies following the updated installation section of the README.md.
npm install [email protected]
@jfcere I see marked is still a dep in version 15. i thought this was being moved to peerDep as discussed
@FirstVertex Out of curiosity, where do you see marked as a dependency as per version 15? https://unpkg.com/browse/[email protected]/package.json
I see it here https://github.com/jfcere/ngx-markdown/blob/master/package.json I apologize if that was a wrong assumption that this package.json corresponds to the one in the published package.
Yeah no, the package.json for the published package is in the lib folder here:
https://github.com/jfcere/ngx-markdown/blob/master/lib/package.json