Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

custom webpack configuration + qunit testing #1892

Open
MichaelS86 opened this issue Jun 18, 2020 · 0 comments
Open

custom webpack configuration + qunit testing #1892

MichaelS86 opened this issue Jun 18, 2020 · 0 comments

Comments

@MichaelS86
Copy link

MichaelS86 commented Jun 18, 2020

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.

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

No branches or pull requests

1 participant