Open weishengsuptp opened 1 month ago
17:47:26 [vite] Pre-transform error: Failed to resolve import "wailsjs/go/services/browserService.js" from "src/stores/browser.js". Does the file exist?
$ npm --version 10.7.0
$ node --version v22.2.0
$ wails version v2.9.1 ♥ If Wails is useful to you or your company, please consider sponsoring the project: https://github.com/sponsors/leaanthony
vite/3.2.10 win32-x64 node-v22.2.0
发现,把from 'wailsjs/go/services/browserService.js' 改成 from '/wailsjs/go/services/browserService.js' 就可以了,不清楚为啥,绝对路径反而可以。
这些文件是wails构建的时候生成go到js的接口映射,你试下删掉wailsjs这个目录,再重新用wails命令构建看看。如果还报错估计得报给wails那边处理了
17:47:26 [vite] Pre-transform error: Failed to resolve import "wailsjs/go/services/browserService.js" from "src/stores/browser.js". Does the file exist?
$ npm --version 10.7.0
$ node --version v22.2.0
$ wails version v2.9.1 ♥ If Wails is useful to you or your company, please consider sponsoring the project: https://github.com/sponsors/leaanthony
vite/3.2.10 win32-x64 node-v22.2.0