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

esm compatibility for three-shaking with Rollup #52

Open
frederikhors opened this issue Sep 4, 2019 · 1 comment
Open

esm compatibility for three-shaking with Rollup #52

frederikhors opened this issue Sep 4, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@frederikhors
Copy link

I would like to use Rollup to three-shaking this amazing code (e.g. I'm using only fadeIn).

Can you export default your code making it esm compatible?

Actually I'm using it like this:

import Turbolinks from 'turbolinks'
import 'turbolinks-animate'

Turbolinks.start()

document.addEventListener('turbolinks:load', () => window.TurbolinksAnimate.init())

Am I wrong in my desire?

Thanks.

@jonhue jonhue added the enhancement New feature or request label Sep 23, 2019
@jonhue jonhue self-assigned this Sep 23, 2019
@jonhue
Copy link
Owner

jonhue commented Oct 2, 2019

Hmm... is this really necessary? The way you're using it right now works and there is no code that could be eliminated by three-shaking.
Don't get me wrong. Ideally, we would use ES6 syntax. But the problem is backward compatibility.
Moving to ES6 syntax would mean we'd have to use Babel. Right now I don't have the time to do the migration considering that the code in its current state still works. If you have time feel free to have a go at it. I'm always happy to review pull requests 🙂.

@jonhue jonhue removed their assignment Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants