xatkit-bot-platform / xatkit-chat-widget

(React) Chat widget for Xatkit
https://xatkit.com
MIT License
5 stars 2 forks source link

Could we generate a non-minimized version of the JS? #25

Closed jcabot closed 4 years ago

jcabot commented 4 years ago

For testing purposes, it would be much easier to work with the plain version of xatkit.js

gdaniel commented 4 years ago

Or provide the map file to have useful error line numbers

hamzaed commented 4 years ago

The widget is implemented using ECMAScript 6 which is not fully supported by the browsers. Webpack and Babel are used to bundle and transpile the library to ECMAScript 5 compatible code.

jcabot commented 4 years ago

I still run into this issue, whether it's a map or the option to import a number of "source" .js files instead of just the minified one for testing, I need a way to debug errors or we end up having no clue of what's going on.

hamzaed commented 4 years ago

The original source is in JSX format ( HTML statements inside Javascript) and can't be understood by the browser. I'll see if I can configure Webpack/babel to generate a map file or at least non-ugly transpiled files. The best way to debug for now would be to clone the repo and debug the widget in the dev mode with your IDE.

hamzaed commented 4 years ago

Now we generate sourcemaps to help debug JS directly in the browser in production mode. However, these sourcemaps should be kept hidden from end customers.