rollup / rollup-plugin-commonjs

This module has moved and is now available at @rollup/plugin-commonjs / https://github.com/rollup/plugins/blob/master/packages/commonjs
MIT License
502 stars 126 forks source link

Fix for Rollup 0.58 #313

Closed guybedford closed 6 years ago

guybedford commented 6 years ago

The latest Rollup runs the load and transform hooks of plugins in parallel, as a result, some assumptions of ordering in this plugin were breaking, causing https://github.com/rollup/rollup/issues/2159 and likely https://github.com/rollup/rollup/issues/2130 as well.

This restores the ordering guarantees within the plugin itself.

kzc commented 6 years ago

Nice work. Is a simple test possible?

guybedford commented 6 years ago

The tests already fail with Rollup 0.58, specifically the react-apollo form test.

guybedford commented 6 years ago

There were a couple of other regressions in the tests on the Rollup upgrade path, I've included the Rollup upgrade here and fixed those as well.

These tests are currently failing on one case which is a sourcemap naming test. The Rollup fix for this is at https://github.com/rollup/rollup/pull/2161.

lukastaegert commented 6 years ago

Ah, and I guess I need to merge the rollup fix first to be able to release this without skipping tests...

guybedford commented 6 years ago

I've switched this to a 0.57 upgrade only, so the tests are passing - should be good to merge to get this out, as I think it's an important fix.

lukastaegert commented 6 years ago

This has been released as rollup-plugin-commonjs 9.1.1

TrySound commented 6 years ago

Thanks I will check it out.