jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
679 stars 58 forks source link

Trouble with ES6 import #60

Closed badgermole closed 3 years ago

badgermole commented 6 years ago

I would love to give this toolkit a try, but I'm not able to get past the ES6 import statement. I'm thinking perhaps it's because I'm using Express as the server, and nodejs doesn't yet support the import statement? In other words, when running Express as the server and sending:

I get "Uncaught SyntaxError: Unexpected string" from the first statement of xel.js, which is the import "./runtime.js";

But that's showing in the Chrome debug tools.

Yet, I can see the examples at https://xel-toolkit.org just fine. In both cases I'm using the same Chrome browser version 63.0.3239.108.

What am I not understanding?

(Note, what I'm wanting to do eventually is make an Electron or NWJS app with it's UI served from my server).

jarek-foksa commented 6 years ago

Please follow the instructions on https://xel-toolkit.org/setup. You should be using <script src="node_modules/xel/xel.min.js"></script>, not <script src="xel/xel.js"></script>.

badgermole commented 6 years ago

Thanks very much for responding. I should have tried your steps exactly first, but I already had some of the routing set up when my searching brought me to Xel and at that point, I didn't have to have a route to the root of the site, below which is the node_modules directory. I'm still learning a lot about the node ecosystem and JavaScript between the server and browser environments.

jarek-foksa commented 3 years ago

Xel project underwent a major rewrite recently. If you can still reproduce this issue, please report it on https://xel-toolkit.org/issues.