I have following app tree:
- my_app
- src
- js
- dir_1_with_js
- ...
- dir_n_with_js
- package.json
- webpack.config.js
- script_1.js
- ...
- script_n.js
- ui
- ui_dir_1_with_js
- ...
- ui_dir_n_with_js
- ui_script_1.js
- ...
- ui_script_n.js
- js
- src
For explanation: current application was developed using webpack and directory js
. Now, I need to (slowly - page by page) transform current state into another one, so I would like to separate it. I have created directory ui
in where I will develop new app UI. But this change unfortunately cannot be done as new and complete UI, but it will be transformed page by page, so I need to process both directories ui
and js
by one webpack.
I would like to call: npm run webpack
from the directory js
and I need that webpack will compile all scripts from the directories js
and ui
. Is it possible some way? What I should "say" to webpack? What configuration should be done in webpack.config.js
to make it work?
I hope I've explained it well. Thank you very much in advance.