Closed
Description
- Echo Version: 1.12.0
- Laravel Version: 9.18.0
- PHP Version: 8.1.7
- NPM Version: 8.11.0
- Node Version: 16.15.1
Description:
In v1.11.5 the IIFE distribution file was broken by #333. In my opinion, the new exports are completely useless given classes are already exported in their own right:
- https://github.com/laravel/echo/blob/master/src/channel/channel.ts
- https://github.com/laravel/echo/blob/master/src/channel/presence-channel.ts
They can be used without modification to the library, by simply:
import { PresenceChannel } from 'laravel-echo/src/channel'
The changes break the IIFE distribution by exporting multiple objects. The change results in new usage:
var myEcho = new Echo.default({});
This was highlighted in #336 already, but closed as unsupported. If that's the case, then I would suggest that the IIFE distribution is removed. However, that seems unnecessary given the changes in #333 are unnecessary and if they were to be reverted then the IIFE distribution would work again...
Steps To Reproduce:
Use the dist/echo.iife.js
file:
<script src="echo.iife.js"></script>
<script>var myEcho = new Echo({});</script>
Uncaught TypeError: Echo is not a constructor
Metadata
Metadata
Assignees
Labels
No labels