Ensure seamless transitions for applications with custom webpack.config.js #910
Description
Is your feature request related to a problem? Please describe.
In many cases the applications have custom logic in their webpack.config.js
files. Whenever these apps update their nativescript-dev-webpack
version, they must manually apply all the latest changes from the default webpack.config.js
that comes with the new version. In case they do not apply the changes, the new features will not work and in some rare cases the application may not built at all. This makes it really difficult and time consuming to have custom webpack.config.js
file.
Describe the solution you'd like
Provide an easy way to have custom logic in the webpack.config.js file. For example, the main application's webpack.config.js
file may require the default webpack.config.js
file (directly from node_modules
, receive the config
object as its result and modify it based on application's requirements. The webpack
process will receive the application's webpack.config.js file. This way, once nativescript-dev-webpack
is updated, the custom application code will not be changed (probably in rare cases there might be some requirements for changes) and all new features will be automatically enabled. This way users will have a very smooth and easy upgrade path.
Describe alternatives you've considered
Another possible solution is to have some logic to apply multiple webpack.config.js
files from different sources. Application's webpack.config.js
can be applied last. Before it, we can apply multiple files coming from plugins, not only nativescript-dev-webpack
. This is related to this feature request