Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rollup-plugin module resolve when rootDir is a relative path #1471

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

jodarove
Copy link
Contributor

Details

By default @lwc/rollup-plugin try to find the modules in the same directory of the entry. Some times this is not enough and you need to specify the root directory of the lwc modules (rootDir option)

When the rootDir is present and is a relative path, it will not work, even if is correct relative to the process.cwd()

This pr normalize the rootDir option by doing a path.resolve(rootDir)

Does this PR introduce breaking changes?

  • No, it does not introduce breaking changes.

By default @lwc/rollup-plugin try to find the modules in the same directory of the entry. Some times this is not enough and you need to specify the root directory of the lwc modules (rootDir option)

When the rootDir is present and is a relative path, it will not work, even if is correct relative to the process.cwd()

This pr normalizes the rootDir option by doing a path.resolve(rootDir)
@jodarove jodarove requested review from diervo and pmdartus August 23, 2019 05:08
@diervo diervo merged commit c8da2ee into master Aug 23, 2019
@diervo diervo deleted the jodarove/fix-module-resolver-isRootDir branch August 23, 2019 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants