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
468 stars 96 forks source link

mainFields funny behaviour #212

Closed sormy closed 5 years ago

sormy commented 5 years ago

jsnext/main/module are deprecated

attempt to use { jsnext: true } causes

node-resolve: setting options.jsnext is deprecated, please override options.mainFields instead

attempt to use { mainFields: ["jsnext"] } causes exception:

throw new Error(`node-resolve: do not use deprecated 'module', 'main', 'jsnext' options with 'mainFields'`);

I would vote to revert this mainFields PR and send on rework to original author.

lukastaegert commented 5 years ago

I would vote to revert this mainFields PR and send on rework to original author

Thank you for bringing up this issue but please avoid the snarky comments unless you also want to vote for yourself to become active maintainer of this plugin. Which is an option I would very much welcome as this open source project is, like most other open source project, terribly understaffed.

Nevertheless I will have a look.

lukastaegert commented 5 years ago

Note though that jsnext is a rather uncommon choice for this option as you probably want to use jsnext:main instead. Which is why this case was probably not tested.

lukastaegert commented 5 years ago

Actually your issue should be just what is written in the error: You are using BOTH the mainFields option and one of the other options together. Remove the other options.

sormy commented 5 years ago

I'm apologize. Did not want to offense anybody.

But anyway, thanks for help. You are right, forgot to remove old option before setting new one.

Regarding help with maintenance - I'm open, let me know if you would like me to help with anything related to rollup project. ;-)