Marked version: 4.3.0 (via ngx-markdown)
Describe the bug
Currently, the marked.min.js file isn't being exported from the package, which makes it hard to use in Angular applications with Yarn PnP. Angular will load scripts declared in their angular.json if that script is exported. Currently the exports are only the following:
"exports": {
".": {
"import": "./lib/marked.esm.js",
"default": "./lib/marked.cjs"
},
"./bin/marked": "./bin/marked.js",
"./package.json": "./package.json"
}
So I end up with an error when I declare marked/marked.min.js
"scripts": [
"marked/marked.min.js",
"prismjs/prism.js",
"prismjs/components/prism-json.min.js",
"prismjs/components/prism-scss.min.js",
"prismjs/components/prism-typescript.min.js"
],
The prism scripts load ok, but for the marked script I get this error:
Error: Package path ./marked.min.js is not exported from package .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\ (see exports field in .yarn\cache\marked-npm-4.3.0-da40d83667-0db6817893.zip\node_modules\marked\package.json)
Proposal
I'm proposing simply adding the marked.min.js to the package export list:
"exports": {
".": {
"import": "./lib/marked.esm.js",
"default": "./lib/marked.cjs"
},
"./marked.min.js": "./marked.min.js",
"./bin/marked": "./bin/marked.js",
"./package.json": "./package.json"
}
Marked version: 4.3.0 (via
ngx-markdown)Describe the bug
Currently, the
marked.min.jsfile isn't being exported from the package, which makes it hard to use in Angular applications with Yarn PnP. Angular will load scripts declared in theirangular.jsonif that script is exported. Currently the exports are only the following:So I end up with an error when I declare
marked/marked.min.jsThe prism scripts load ok, but for the marked script I get this error:
Proposal
I'm proposing simply adding the
marked.min.jsto the package export list: