Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

feat: allow extending webpack.config.js through env #1116

Merged
merged 2 commits into from
Jan 22, 2020

Conversation

rosen-vladimirov
Copy link
Contributor

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

In case you need to extend the webpack.config.js, currently you cannot extend everything and you need to write a lot of custom logic. This PR adds the possibility to extend the appComponents, entries and alias through env.
Also update demo applications to use latest CLI feature for extending webpack.config.js
Merge after: NativeScript/nativescript-cli#5216

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

In case you need to extend the webpack.config.js, currently you cannot extend everything and you need to write a lot of custom logic. This PR adds the possibility to extend the appComponents, entries and alias through `env`.
Also update demo applications to use latest CLI feature for extending webpack.config.js
@cla-bot cla-bot bot added the cla: yes label Jan 16, 2020
@rosen-vladimirov
Copy link
Contributor Author

test ngapps

As the demo apps are now using custom webpack.config.js files, they no longer need the default webpack.config.js files. They'll be managed by the installation of nativescript-dev-webpack
@rosen-vladimirov
Copy link
Contributor Author

test webpack-apps

1 similar comment
@rosen-vladimirov
Copy link
Contributor Author

test webpack-apps

@dtopuzov
Copy link
Contributor

test webpack-apps branch#vladimirov/custom-configs

@rosen-vladimirov rosen-vladimirov merged commit 53cac58 into master Jan 22, 2020
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/custom-configs branch January 22, 2020 09:46
@jibon57
Copy link

jibon57 commented Jan 30, 2020

@rosen-vladimirov thanks for excellent feature. How I'll add custom file type in CopyWebpackPlugin?

@rosen-vladimirov
Copy link
Contributor Author

Hey @jibon57 ,
I've created a sample application demonstrating how you can achieve this: https://github.com/rosen-vladimirov/appCustomWebpackConfig
Check the README for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants