Created
October 2, 2015 21:31
-
-
Save georgiee/6b24cdd89dc91c19f037 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scope: | |
How to create a local project which should be use in another local project- as a library | |
. | |
+ Make it a local linked package, install it in your other project, enable the library option in webpack, builed it manually or with the watch option. | |
1. Use npm link to symlink your local module A into module B. So all your changes in module A are reflected immediately in module B | |
See here: https://docs.npmjs.com/cli/link | |
2. Make sure that your source module (A) is wrapped correctly by webpack so you can require it like any other library. | |
Use this: https://github.com/webpack/webpack/tree/master/examples/multi-part-library | |
3. Now you can require it normally and now focus on Project B! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment