Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commonjs output to distribution. #212

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

tlaverdure
Copy link
Contributor

Some developers are using this package server side, without a bundler like Webpack. This includes a CommonJs output as the main module for those cases, and ES6 exports should still be discovered using the module property of the package.json file.

Both should work depending on the build tools the developer is using. For example, Rollup and Webpack use this field to determine which is appropriate.

import Echo from "laravel-echo"
const Echo = require("laravel-echo");

Addresses: #211

@driesvints
Copy link
Member

driesvints commented Dec 4, 2018

@tlaverdure did you forget to commit the echo.common.js file?

Nvm, don't mind me 😅

@tlaverdure
Copy link
Contributor Author

tlaverdure commented Dec 4, 2018 via email

@taylorotwell taylorotwell merged commit 9acdabc into laravel:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants