This repository has been archived by the owner on May 1, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description of what this resolves:
In order to share code among projects, using symlinks is one of the options. However, Ionic does not support symlinks out of the box. This commit will add this support.
Changes proposed in this pull request:
Add symlink support in the webpack configuration
By setting the webpack configuration
symlinks
tofalse
. This sounds a bit counter intuitive, but it will make webpack look for the files in the symlinked location instead of the in real location.Add symlink support to the glob-util
I found that when using symlinks, the files were not updated when running
ionic serve
. By debugging for a few hours I found that a tool calledglob
was not resolving symlinked directories. A symlinked directory was treated as a file. Therefore only the first file (e.g., shared/shared.module.ts) was cached in the context file cache and not the files in underlying directories. This was causing the transpiler not to update those files when they were changed. By settingfollow: true
this problem is resolved.Example
I have included a minimal example project. The README.md includes the two instruction you'll have to follow to make this work.
ionic-symllink-example.zip
Fixes: #635