Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] 请问有什么方式可以替换包内ref-napi和ffi-napi依赖吗 #63

Open
xmsz opened this issue Apr 13, 2023 · 1 comment

Comments

@xmsz
Copy link

xmsz commented Apr 13, 2023

背景

  • electron
  • electron无法正常构建ffi-napi(社区共有的问题),所以用的是第三方改好的包@lwahonen/ffi-napi
  • win32-api包用的是ffi-napi,所以electron项目用不了

需求

  • 如何解决这个情况

我的想法

  • 通过webpack那ffi-napi替换成@lwahonen/ffi-napi,我试了webpack.resolve.alias,但这个好像不能替换node_modules里
  • 手动替换包内api,然后打包或者有引入,这个方法是在太麻烦了
@waitingsong
Copy link
Owner

给个最小复现仓库,我看看怎么弄比较好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants