tunnckoCore / rollup-plugin-prepack

Rollup plugin for Facebook Prepack - https://prepack.io
MIT License
33 stars 2 forks source link

no longer works with latest prepack 0.2.38 #13

Closed Pyrolistical closed 4 years ago

Pyrolistical commented 6 years ago

This fork changed the API https://github.com/joseluisq/rollup-plugin-prepack-up, but uses the correct prepack api

tunnckoCore commented 6 years ago

Oh yea.. I just seen #12. I'l merge it and release/publish probably tomorrow.

@joseluisq why not just sent PR?

Pyrolistical commented 6 years ago

i don't see how #12 will fix the issue. The current code calls prepack.prepack which doesn't work, I think it needs to be changed to prepack.prepackSources

tunnckoCore commented 6 years ago

Why not, there is no prepack method anymore? Didn't used it recently and don't actively following it. But i can add someone to have access to the repo and npm.

Pyrolistical commented 6 years ago

They changed it to Prepack.prepackSources([{filePath, fileContents, sourceMapContents}], options) // returns { code: string, map: SourceMap }

See https://prepack.io/getting-started.html

Pyrolistical commented 6 years ago

Also I don't understand how this is suppose to work. I have rollup generating a UMD with the plugin stack:

But when I looked at what is passed into prepack and it already includes the UMD jazz. There's no way prepack would work, since UMD is fundamentally about figuring out the environment. Prepack needs to run after all the files are concat into one, but before its final iife/umd output

joseluisq commented 6 years ago

Hey guys, sorry for the confusion. The main reason because I had decided to fork was that I needed the plugin very urgent and I didn't see activity in this repo (at the fork moment) at least since the last year.

@joseluisq why not just sent PR?

Sure, I can send a PR if you prefer. This #12 upgrade the dependency only. Basically the Prepack API has changed:

Tell me how can I help?

tunnckoCore commented 6 years ago

yea, I understand but not always time matter. In most of my repos everything is up to date and builds are passing without any changes for years. But yea.

Also could send another pr with the additional changes, so eventually was able to see your pr. Because some times we just miss the notifications, such as in this case.

Anyway :) PR is welcome, if not i'll do the changes. : )

Cheers

joseluisq commented 6 years ago

I just sent a PR with the API and dependency upgrades #14 To say this PR is based on your current repository (in sync with your last changes) because my repo is quite different. Let me know your feedback.

tunnckoCore commented 6 years ago

Sweet, thanks! :)

I requested some thoughts on the comments.

gingur commented 4 years ago

Any update on this? Couldn't you just pin the version of prepack to an older one until updated to support new?

tunnckoCore commented 4 years ago

prs welcome. but won't be able to publish on npm. or is there some non-terminal way? ;d

tunnckoCore commented 4 years ago

Published 1.1.0 stable.