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

fix(): make empty.js virtual #224

Closed manucorporat closed 5 years ago

manucorporat commented 5 years ago

At stencil we try to make rollup and this plugin to work in the browser, in addition, we bundle rollup-plugin-node-resolve into the stencil's bundle. The fact that empty.js is a read file within the file system makes it harder in some cases.

This PR solves that by making the empty.js file a virtual module.

manucorporat commented 5 years ago

In addition, it modernizes the code a little bit, but using Map() and avoiding excessive branches.

lukastaegert commented 5 years ago

Really like the changes!