Closed BppleMan closed 10 months ago
its ngx-highlightjs
its
ngx-highlightjs
@MurhafSousli
That's a typo, but the problem remains
I don't use pnpm, shouldn't it work like yarn? or I have to publish the package to pnpm?
@MurhafSousli I think the problem is with highlight.js
resolving. pnpm or yarn pnp doesn't linking it.
Possible solution is installing directly to project:
pnpm install highlight.js
@MurhafSousli second option:
add to .npmrc:
public-hoist-pattern[]=*highlight.js*
@MurhafSousli so the idea is to make ngx-highlightjs works like solid package. Library should work like line-numbers
example:
coreLibraryLoader: () => import('highlight.js/lib/core'),
languages: {
css: () => import('highlight.js/lib/languages/css'),
scss: () => import('highlight.js/lib/languages/scss'),
typescript: () => import('highlight.js/lib/languages/typescript'),
xml: () => import('highlight.js/lib/languages/xml'),
},
should be replaced with:
coreLibraryLoader: () => import('ngx-highlightjs/highlight-lib'),
languages: {
css: () => import('ngx-highlightjs/languages/css'),
scss: () => import('ngx-highlightjs/languages/scss'),
typescript: () => import('ngx-highlightjs/languages/typescript'),
xml: () => import('ngx-highlightjs/languages/xml'),
},
This is a dependency, how can you receive updates and fixes from the main package then?
@MurhafSousli pnpm uses linking to node_modules: Flat node_modules is not the only way
So, for libraries there are 2 approaches:
highlight.js
directly to their projectspublic-hoist-pattern[]=*highlight.js*
to .npmrcconst core = import('highlight.js/lib/core');
export default core;
I am afraid this is out of the scope for this project.
This is just a wrapper package of highlight.js
and it depends on it, it works the standard npm. for other tools - developers should figure it out on their own.
Reproduction
Expected Behavior
run project
Actual Behavior
Environment