Closed bterlson closed 5 years ago
Ok, I need a better way to test this on Linux. I guess paths on linux must always be posix paths else things break.
I'd recommend stealing the CI config from rollup/rollup. We made some pretty solid containers that it uses.
Ok, I need a better way to test this on Linux. I guess paths on linux must always be posix paths else things break
Definitely, see my comment.
@lukastaegert the latter approach seemed best actually. I've also updated the comments to be more clear, see if you like them now 😀
Would this be a breaking change or a bug fix?
@lukastaegert Sorry I missed your message. This should just be a bug fix that causes more things to work. It impacts e.g. rollup-plugin-typescript2, but only because the hack is no longer necessary (but doesn't do any harm).
Actually I think it will break people who are currently using rollupCommonJSResolveHack
in rollup-plugin-typescript2 -- what that option does is makes rpt2 use resolve
package to get the path, which will use native OS format. If this plugin switches to POSIX path, namedExports
will be out of sync again, and people will have unset that option.
Should be a minor version at least.
Thanks, then I'll make it a minor.
This fixes an issue frequently hit when using the typescript rollup plugin. Because TypeScript always returns posix paths, but node resolve will normalize on a per-platform basis, comparisons must be carried out on normalized forms. This PR fixes some missing normalization and obviates rollup-plugin-typescript2's
rollupCommonJSResolveHack
option (/cc @ezolenko), and fixes #177 and probably a few others as well.