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
501 stars 126 forks source link

Support preserveSymlinks: false (fixes #400) #401

Closed bterlson closed 5 years ago

bterlson commented 5 years ago

Let me know if there is anything else required here!

Fixes #400.

bterlson commented 5 years ago

I'm not sure why my test is failing in appveyor - it passes locally (on windows, in node 8, 10, and 12). Appreciate any thoughts on how to fix it while I ponder...

The error is:

  1) rollup-plugin-commonjs
       misc tests
         handles symlinked node_modules with preserveSymlinks: false:
     Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
      at error (node_modules\rollup\dist\rollup.js:9396:30)
      at Module.error (node_modules\rollup\dist\rollup.js:13333:9)
      at tryParse (node_modules\rollup\dist\rollup.js:13248:16)
      at Module.setSource (node_modules\rollup\dist\rollup.js:13564:33)
      at Promise.resolve.catch.then.then.then (node_modules\rollup\dist\rollup.js:16350:20)
      at <anonymous>
bterlson commented 5 years ago

Looks like the issue was that core.symlinks isn't enabled by default in git for windows. Once enabled, it looks like everything passes! 🎉