electron-webpack build
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 13.7k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi there,
I am using electron-webpack to pack sql.js into an electron app, but getting the below errors.
The first error appears to have an issue with the sql-wasm.wasm file.
Uncaught SyntaxError: Invalid or unexpected token
The second error is because electron-webpack seems to want to still load the sql-wasm.wasm file from node_modules despite being copied over to js/sql-wasm.wasm output already.
/home/stuart/dev/ele…ist/sql-wasm.js:167 GET http://localhost:9080/home/stuart/dev/electron-svelte-typeorm-typescript/node_modules/sql.js/dist/sql-wasm.wasm 404 (Not Found)
/home/stuart/dev/ele…ist/sql-wasm.js:167 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': HTTP status code is not ok
/home/stuart/dev/ele…ist/sql-wasm.js:167 falling back to ArrayBuffer instantiation
GET http://localhost:9080/home/stuart/dev/electron-svelte-typeorm-typescript/node_modules/sql.js/dist/sql-wasm.wasm 404 (Not Found)
Any thoughts would be appreciated. The sample repo is at https://github.com/eightfivelabs/electron-svelte-typeorm-typescript
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
Start by reproducing the sample repository linked in the issue and inspect sql-wasm.js alongside the sql-wasm.wasm asset. Trace why the generated application requests the file from node_modules and why the initial wasm load produces a syntax error; done means the Electron build loads sql.js without either reported error.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- electron, javascript, sqlite, wasm
- 领域
- build-system, databases, desktop
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100