Skip to content

feat: allow setting custom webpack config file #5216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 17, 2020

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Jan 15, 2020

Currently CLI passes the webpack.config.js at the root of the application as config to the spawned webpack process. This file is managed by both the developers and nativescript-dev-webpack (when you update this package, you often have to update the file, which overrides any custom settings).
In order to allow easier upgrades and customizations, add an option in nsconfig.json (webpackConfigPath) to set the path to config file passed to webpack process. This way, the webpack.config.js can be managed by nativescript-dev-webpack and all customizations can be done in another file. The path to custom file can be set in nsconfig.json and CLI will pass it to webpack.

PR Checklist

Implements issue #5218

@rosen-vladimirov rosen-vladimirov added this to the 6.4.0 milestone Jan 15, 2020
@rosen-vladimirov rosen-vladimirov self-assigned this Jan 15, 2020
@cla-bot cla-bot bot added the cla: yes label Jan 15, 2020
@rosen-vladimirov
Copy link
Contributor Author

test cli-run

@rosen-vladimirov
Copy link
Contributor Author

test cli-run

Currently CLI passes the webpack.config.js at the root of the application as config to the spawned webpack process. This file is managed by both the developers and nativescript-dev-webpack (when you update this package, you often have to update the file, which overrides any custom settings).
In order to allow easier upgrades and customizations, add an option in nsconfig.json (`webpackConfigPath`) to set the path to config file passed to webpack process. This way, the `webpack.config.js` can be managed by nativescript-dev-webpack and all customizations can be done in another file. The path to custom file can be set in nsconfig.json and CLI will pass it to webpack.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/custom-webpack-config branch from 12b1b5f to 5634f41 Compare January 17, 2020 06:43
@rosen-vladimirov rosen-vladimirov merged commit e143cbe into master Jan 17, 2020
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/custom-webpack-config branch January 17, 2020 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants