SoftwareBrothers / better-docs

Beautiful toolbox for jsdoc generated documentation - with 'typescript', `category` and `component` plugins
MIT License
856 stars 127 forks source link

Cannot resolve dependency with @component #20

Open joshleblanc opened 5 years ago

joshleblanc commented 5 years ago

This is probably a windows issue. Trying to use the @component tag results in this in entry.js

      import Wrapper from '..\node_modules\better-docs\lib\react-wrapper.js';

That should be

      import Wrapper from '../node_modules/better-docs/lib/react-wrapper.js';

The imports for the components have the same problem.

robokozo commented 5 years ago

I also get a similar error. image

wojtek-krysiak commented 5 years ago

I've just published 1.3.3 version - please check it out - it should fix this (unfortunately I don't have Windows to check it out)

robokozo commented 5 years ago

I tried it again and got a different error with the new version.

image

robokozo commented 4 years ago

I think one possible issue is this line in bundler.js

require('path').posix

DomenicRoti commented 4 years ago

I just want to add I'm experiencing this as well on (on a mac), this is using @component in a vue/webpack project.

image image

hellhoundsx commented 4 years ago

A bit of a stretch but for future guys passing through

@DomenicRoti you need to setup aliases on your .babelrc: add this package to your project babel-plugin-module-resolver

and your .babelRC should look like(ignore the react-hot-loader): Screenshot 2020-05-06 at 16 46 42

malikalimoekhamedov commented 4 years ago

Why was this issue closed? It's still alive and well. The aforementioned hack is not really applicable to create-react-app based projects isn't it? We don't really have access to custom webpack configurations unless we eject. Or am I missing something?