Closed fiedl closed 4 years ago
[2020-01-26 16:59:36] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/my_engine master ⚡
▶ npm link
[2020-01-26 17:00:01] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/my_second_engine master ⚡
▶ npm link
[2020-01-26 17:00:26] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ npm link my_engine
/Users/fiedl/rails/webpacker-engine-test/main_app_with_webpacker/node_modules/my_engine -> /usr/local/lib/node_modules/my_engine -> /Users/fiedl/rails/webpacker-engine-test/my_engine
[2020-01-26 17:00:30] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ npm link my_second_engine
/Users/fiedl/rails/webpacker-engine-test/main_app_with_webpacker/node_modules/my_second_engine -> /usr/local/lib/node_modules/my_second_engine -> /Users/fiedl/rails/webpacker-engine-test/my_second_engine
What to run while developing?
[2020-01-26 17:06:12] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ bin/webpack --watch
[2020-01-26 17:03:00] fiedl@fiedl-mbp ~/rails/webpacker-engine-test/main_app_with_webpacker master ⚡
▶ bin/rails server
When developing my_engine (#1) or my_second_engine (#2), it's convenient to use the local source files rather than going through the package repository.
npm link
might be used just asbundle config
. https://docs.npmjs.com/cli/link.html