Some of user report error from my component plugin for VuePress.
I can't find solution to fix it. Maybe bug?
v1.0.0-alpha.42
Example repo: https://github.com/gluons/vuepress-issue-1414
Build complete without errors.
Get error from vuepress build but vuepress dev works perfectly.

Hello, I run the case.
yarn dev
But I get Uncaught Error: Cannot find module 'vue-component-with-plugin' in console.
This plugin has been applied.

I guess something error in vue-component-with-plugin/plugins/vuepress/index.js#L6.
Maybe it doesn't know where to import from?
@YunYouJun Did you follow Steps to repro in my repo?
cd vue-component-with-plugin
yarn
yarn build
cd ..
cd vuepress-project
yarn
yarn dev
It works without any error on my side.

I deleted it , then reproduced it. And it works. 馃槩
I am sorry for my carelessness and helplessness.
After many attempts, I found that using require('../../vue-component-with-plugin/plugins/vuepress') instead of require('vue-component-with-plugin/plugins/vuepress') may solve the problem.
However I still don't know what caused the issue.
Similar to #451. I believe it is a duplicate issue.
@gluons You can use relative path to workaround this issue. Let's move to #451 to continue discussion.
Most helpful comment
I deleted it , then reproduced it. And it works. 馃槩
I am sorry for my carelessness and helplessness.