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 issues with Linking Library #141

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

torbrenner
Copy link
Collaborator

@torbrenner torbrenner commented Oct 28, 2024

General Summary

Ensure dist directory structure without relying on a custom plugin.

Description

In the case of running npm run watch, on the first build vite will run all plugins, but with later rebuilds the plugins are not again run. This causes issues in the scenarion in which you try to build the library locally and link it to a depending application. In those cases changes to the library wont be picked up by the depending application. As a side note, i needed to disable the removal of the dir on each by vite (emptyOutDir option), as otherwise after the first rebuild in npm run watch the types file would be deleted and the dts plugin would also not trigger. To simulate the clearing beheaviour at least for normal builds, i added a rimraf dist to npm run build.


How Has This Been Tested?

By localy linking to the BBMRI Sample Locator Application. Please note it was also necessary to add

optimezeDeps: {
  exclude: ["@sample/lens"]
}

to the vite config of the depending project, as otherwise vite wont pick up changes.


  • The commit message follows guidelines
  • Tests for the changes have been added
  • Documentation has been added/ updated

@torbrenner torbrenner changed the base branch from main to develop October 28, 2024 15:36
@torbrenner torbrenner marked this pull request as ready for review October 31, 2024 09:08
@patrickskowronekdkfz patrickskowronekdkfz merged commit 4d09268 into develop Oct 31, 2024
6 checks passed
@patrickskowronekdkfz patrickskowronekdkfz deleted the fix/probablyLinkingIssues branch October 31, 2024 09:08
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