Currently webpack.config.js is hardcoded in projectFilesManager.js:60
It would be great if nativescript-dev-webpack could read path to a file / name of the webpack file from nsconfig.json or as an argument to cli, like it happening with webpack, where you can specify --config /other/path/different-webpack.config.js
Great idea!
In the current next version of CLI, you can set webpackConfigPath in your nsconfig.json. CLI will use the value and pass the path to --config option when starting the webpack process.
An example how to have a webpack configuration, that has a custom logic, can be found in this PR: https://github.com/NativeScript/nativescript-dev-webpack/pull/1116
Available in nativescript-dev-webpack@next, will be officially shipped in [email protected]
Thank you!
Most helpful comment
In the current
nextversion of CLI, you can setwebpackConfigPathin yournsconfig.json. CLI will use the value and pass the path to--configoption when starting the webpack process.An example how to have a webpack configuration, that has a custom logic, can be found in this PR: https://github.com/NativeScript/nativescript-dev-webpack/pull/1116