Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

Add fix to symlinked packages - #82

Merged
Rich-Harris merged 4 commits into
rollup:masterfrom
ma2ciek:master
Mar 31, 2017
Merged

Rich-Harris merged 4 commits into
rollup:masterfrom
ma2ciek:master

Conversation

@ma2ciek

@ma2ciek ma2ciek commented Feb 22, 2017 •

Copy link
Copy Markdown
Contributor

This pull request fixes #67.

Fix adds support for the symlinked packages which are used by Lerna and some other multi-package tools.

I'm not sure whether these lines can be improved. If yes, please give me some insight about the cases that this improvement doesn't solve.

I added pretty simple test which describes the problem very well.

The solved problem:
Package A requires B and C
Package B requires C
All packages are symlinked between each other.

Now references to files in package C differs between A and B which breaks e.g singletons, instanceof checks and equality checks.

Thanks!

@ma2ciek

ma2ciek commented Feb 23, 2017 •

Copy link
Copy Markdown
Contributor Author

I have no idea why the error is thrown by the CI in this PR when the code is running on Node.js v. 0.12.18. environment.

1) rollup-plugin-node-resolve resolves symlinked packages:
     SyntaxError: Use of const in strict mode.
      at Function (native)
      at executeBundle (test/test.js:17:11)

@ma2ciek ma2ciek closed this Feb 23, 2017
@ma2ciek ma2ciek reopened this Feb 23, 2017
@ma2ciek

ma2ciek commented Feb 27, 2017 •

Copy link
Copy Markdown
Contributor Author

Node v. 0.12 is no longer LTS: #85 (comment)

@Rich-Harris
Rich-Harris merged commit 911fb70 into rollup:master Mar 31, 2017
@Rich-Harris

Copy link
Copy Markdown
Contributor

Thank you! Sorry for the delay, released as 2.1.0

@ma2ciek

ma2ciek commented Apr 7, 2017

Copy link
Copy Markdown
Contributor Author

Thank you too for the merge ;)

@zerkalica

zerkalica commented Apr 4, 2018 •

Copy link
Copy Markdown

Need help.

I use lerna. Same problem:
Package A requires B and C
Package B requires C

B, C - libraries, A - browser application. C is not symlinked - this is external dependency and described in dependency sections of B and A, like react

Rollup loads both C.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm-link

3 participants