rollup / rollup-plugin-node-resolve

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

Strange code after upgrading up from v3.1.0 #155

Closed uNmAnNeR closed 6 years ago

uNmAnNeR commented 6 years ago

Hello!

I use node-resolve-plugin in my project imaskjs for importing some core-js polyfills.

After upgrading plugin up from v3.1.0 some strange code with Object.freeze... appears: compiled with v3.1.0 compiled with v3.3.0 diff which increases compiled size.

Is it really needed? No mistake here?

lukastaegert commented 6 years ago

Hi @uNmAnNeR, thanks for the issue. So you are saying the only dependency that changed is rollup-plugin-node-resolve, i.e. both builds use the exact same version of rollup? It would be very helpful if you could confirm this as this seems very related to the observations in rollup/rollup#2130

uNmAnNeR commented 6 years ago

@lukastaegert Yes, the only one. So, previous builds were: build rollup@0.58.1, node-resolve@3.1.0 build rollup@0.58.1, node-resolve@3.3.0

But lets do some more tests. Rollback to: build rollup@0.54.1, node-resolve@3.0.2 Update rollup: build rollup@0.58.1, node-resolve@3.0.2 diff rollup 0.54.1->0.58.1 Than update node-resolve: build rollup@0.58.1, node-resolve@3.3.0 diff node-resolve 3.0.2 -> 3.3.0

So in BOTH updates some new code with /*#__PURE__*/Object.freeze appeared!

uNmAnNeR commented 6 years ago

Fixed in rollup-plugin-commonjs