Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Fix: Add support for symlinks #1519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

intodevelopment
Copy link
Contributor

@intodevelopment intodevelopment commented Mar 7, 2019

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 to false. 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 called glob 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 setting follow: 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

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.
@intodevelopment intodevelopment marked this pull request as ready for review March 7, 2019 19:29
@intodevelopment intodevelopment changed the title Add support for symlinks Fix: Add support for symlinks Mar 16, 2019
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.

1 participant