Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork40
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 theirwebpack.config.js
files. Whenever these apps update theirnativescript-dev-webpack
version, they must manually apply all the latest changes from the defaultwebpack.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 customwebpack.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'swebpack.config.js
file may require the defaultwebpack.config.js
file (directly fromnode_modules
, receive theconfig
object as its result and modify it based on application's requirements. Thewebpack
process will receive the application's webpack.config.js file. This way, oncenativescript-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 multiplewebpack.config.js
files from different sources. Application'swebpack.config.js
can be applied last. Before it, we can apply multiple files coming from plugins, not onlynativescript-dev-webpack
. This is related tothis feature request