You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding the VUE_CLI_KEEP_TEST_ATTRS to a .env.mode file and loading it with --mode mode does not work. The process.env.VUE_CLI_KEEP_TEST_ATTRS and process.env.NODE_ENV are undefined.
Moving the check into the main function solves this issue but I'm not sure if there are any other consequences from doing that - seems like it should be fine though.
Adding the variable directly (using VUE_CLI_KEEP_TEST_ATTRS=true vue-cli-service build for example) work just fine.
The text was updated successfully, but these errors were encountered:
If you create a .env.e2e file with VUE_CLI_KEEP_TEST_ATTRS=true then it will never set defaultOptions.enabled = false and the test attributes will be stripped in your e2e environment because at this point https://github.com/LinusBorg/vue-cli-plugin-test-attrs/blob/develop/index.js#L13-L19 both the process.env.VUE_CLI_KEEP_TEST_ATTRS and process.env.NODE_ENV are undefined.
As I mentioned before, if you do VUE_CLI_KEEP_TEST_ATTRS=true vue-cli-service build it works fine.
Adding the
VUE_CLI_KEEP_TEST_ATTRS
to a.env.mode
file and loading it with--mode mode
does not work. Theprocess.env.VUE_CLI_KEEP_TEST_ATTRS
andprocess.env.NODE_ENV
areundefined
.Moving the check into the main function solves this issue but I'm not sure if there are any other consequences from doing that - seems like it should be fine though.
Adding the variable directly (using
VUE_CLI_KEEP_TEST_ATTRS=true vue-cli-service build
for example) work just fine.The text was updated successfully, but these errors were encountered: