How to get the build ready of ws-client


#1

Hi everyone! I’ve been trying to connect production build of ws-client to my HTML file for testing via a code like that:
<script src="../node_modules/@adonisjs/websocket-client/dist/Ws.browser.js"></script>

But I’ve got a error:

I saw a notice about polyfill but I can’t understand what I have to do for getting it in my simple HTML file. I just want to connect the Build of ws-client to my HTML without babel. I am confused.


#2

Drop this script before the websocket script.

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.0.0/polyfill.js"></script>
// here comes ws