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
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Does it really include them? I just tried webpack --env.prod and looked at the resulting wwwroot/dist/main-client.js. Ctrl+F for "karma" and "should" both gave zero results, so it doesn't look like any test code is in there.
If you have repro steps that cause the tests to be included in production build, can you please post them?
@nicwillemse Unless I'm missing something, the spec files don't need to be excluded. They won't be bundled with the application code, because the application code doesn't reference the specs.
Activity
SteveSandersonMS commentedon Dec 13, 2016
Does it really include them? I just tried
webpack --env.prod
and looked at the resultingwwwroot/dist/main-client.js
. Ctrl+F for "karma" and "should" both gave zero results, so it doesn't look like any test code is in there.If you have repro steps that cause the tests to be included in production build, can you please post them?
nicwillemse commentedon Dec 14, 2016
Hi @SteveSandersonMS,
I was referring to the actual tests themselves, since the webpack configuration does not seem to be excluding specs at all ?
MarkPieszak commentedon Dec 14, 2016
@nicwillemse Do you mean that the webpack configs need the
exclude
portion for.spec.ts
files added in there?SteveSandersonMS commentedon Dec 14, 2016
@nicwillemse Unless I'm missing something, the spec files don't need to be excluded. They won't be bundled with the application code, because the application code doesn't reference the specs.
nicwillemse commentedon Dec 15, 2016
@MarkPieszak thats exactly what im saying. @SteveSandersonMS do you agree with this comment ?
SteveSandersonMS commentedon Dec 15, 2016
No I don't - please see my previous comment for details :)
nicwillemse commentedon Dec 15, 2016
@SteveSandersonMS - im not sure your previous comment applies, the specs will be bundled due to the webpack configuration.
SteveSandersonMS commentedon Dec 15, 2016
Can you confirm that you're actually seeing spec code inside the built bundles in
wwwroot/dist/
?I searched mine and didn't find any spec code in those bundles, nor would I expect to, since the specs are not referenced from the application code.