docs-v7
docs-v7 copied to clipboard
custom webpack configuration + qunit testing
Make sure to check the existing issues in this repository
Please, tell us what's the problem?
[ ] A typo [ ] Wrong documentation [ ] Improvement of existing article [ x ] Missing documentation [ ] New article needed
Please, tell us more details
On the webpage https://docs.nativescript.org/tooling/custom-webpack-configuration there is a detailed description on how to use a separate webpack-config-file for custom issues. (At least) When using QUnit, there is also a karma.conf.js-file that loads the webpack-config, which might also be adapted. A description on issues regarding karma.conf.js when using a custom webpack configuration, however, is missing.
In my recent exemplary case, I made use of dotenv in the webpack-configuration. The expected environment variables, however, were not available during testing, since the testing framework still made use of the standard webpack-config-file. It took me some time to find the reason for that.