lwc icon indicating copy to clipboard operation
lwc copied to clipboard

Run `engine-server` fixture tests with `NODE_ENV=production`

Open nolanlawson opened this issue 10 months ago • 2 comments

I'm noticing that if I run the fixture tests in prod mode, I get different results than dev mode. This seems partially due to some dev-only accessors defined here:

https://github.com/salesforce/lwc/blob/2b678bbe9c62f6c583745897edc4b46e90908449/packages/%40lwc/engine-core/src/framework/base-bridge-element.ts#L111

This is causing issues with global HTML properties/attributes in particular, but there seem to be some problems with outerHTML as well.

PoC: b89016590

nolanlawson avatar Jan 13 '25 22:01 nolanlawson

This issue has been linked to a new work item: W-17592100

git2gus[bot] avatar Jan 13 '25 22:01 git2gus[bot]

It's probably more performant to not define things unnecessarily, but adding empty property descriptors would help avoid subtle foot-guns.

In any case, running engine-server fixture tests with NODE_ENV=production currently has 16 failures. Almost all of them seem to be due to wired data not being provided, a few are around our patches for innerHTML/outerHTML.

If we run NODE_ENV=production yarn test, there are 5 additional failures.

wjhsf avatar Mar 04 '25 17:03 wjhsf