Closed ValentinTrinque closed 3 years ago
/frontend
say to run npm run serve
during development, but using that command results in the following error. It's pretty clear it's expecting to run in a browser instance with some stuff injected, is there a way to mock that for local dev?
TypeError: window.wails is undefined
Init
src/vega/desktop-wallet/frontend/node_modules/@wailsapp/runtime/init.js:19
16 | * @param {function} callback
17 | */
18 | function Init(callback) {
> 19 | window.wails._.Init(callback);
20 | }
21 |
22 | module.exports = Init;
./src/index.tsx
src/vega/desktop-wallet/frontend/src/index.tsx:10
7 |
8 | import * as Wails from '@wailsapp/runtime';
9 |
> 10 | Wails.Init(() => {
11 | ReactDOM.render(
12 | <React.StrictMode>
13 | <App/>
__webpack_require__
src/vega/desktop-wallet/frontend/webpack/bootstrap:766
763 | };
764 |
765 | // Execute the module function
> 766 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 767 |
768 | // Flag the module as loaded
769 | module.l = true;
fn
src/vega/desktop-wallet/frontend/webpack/bootstrap:129
126 | );
127 | hotCurrentParents = [];
128 | }
> 129 | return __webpack_require__(request);
| ^ 130 | };
131 | var ObjectFactory = function ObjectFactory(name) {
132 | return {```
https://github.com/vegaprotocol/console/blob/develop/.eslintrc.js
.nvmrc
and engine config would be useful, but not essential as it doesn't really enforce anything (just makes it more convenient). Suggesting this I've realised that the package.json engines
variable is probably wrong (I don't think node 15 actually works...)Number 1 stop me running it, but it looks like a skeleton that lines up with https://github.com/vegaprotocol/console / https://github.com/vegaprotocol/token-frontend well. I’ll leave it to @dexturr to review when he’s not so busy but I think instructions on running it locally are probably all that’s required. Thanks for getting it this far!
.nvmrc
is already done. Ok for engines, I'll look into this
We would like to distribute the wallet as a desktop application using a cross platform bundler.
Possible bundler: https://github.com/wailsapp/wails/releases