尝试在 electron forge 应用程序中使用本机包(fuse-native)并出现 webpack 错误

问题描述 投票:0回答:0

我正在研究一个涉及在电子应用程序中使用诸如 fuse-native 之类的库的想法。到目前为止,我所做的只是在我的

main.js
文件中添加库/导入包,然后运行
npm start
(在电子应用程序上运行正常)。我正在寻求对我收到的 webpack 错误的理解:

Error: Module parse failed: Unexpected token (11:21)
File was processed with these loaders:
 * ./node_modules/@vercel/webpack-asset-relocator-loader/dist/index.js
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| const include = path.join(OSXFUSE, 'include');
| module.exports = {
>   __webpack_require__.ab + "libosxfuse.dylib",
|   include,
|   configure,

我试过跟随thisthis,也在这里查看了类似的问题,但并没有真正尝试太多,因为我根本不明白错误

webpack electron fuse electron-forge
© www.soinside.com 2019 - 2024. All rights reserved.