-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use legal format for compiler version comment #4637
Conversation
Changed to |
packages/@lwc/template-compiler/src/__tests__/fixtures/static-content/no-escaping-tags/ast.json
Outdated
Show resolved
Hide resolved
โฆler-version-comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nolanlawson karma tests are passing now, but not sure why I had to update these snapshots...
@@ -4,7 +4,7 @@ import { freezeTemplate, parseFragment, registerTemplate } from "lwc"; | |||
const $fragment1 = parseFragment`<xmp${3}></xmp>Hello <div>world</div> <div>foo</div></xmp>`; | |||
const $fragment2 = parseFragment`<iframe${3}>Hello <div>world</div> <div>foo</div></iframe>`; | |||
const $fragment3 = parseFragment`<noembed${3}>Hello <div>world</div> <div>foo</div></noembed>`; | |||
const $fragment4 = parseFragment`<noframes${3}><p${3}>It seems your browser does not support frames or is configured to not allow them.</p></noframes>`; | |||
const $fragment4 = parseFragment`<noframes${3}><p>It seems your browser does not support frames or is configured to not allow them.</p></noframes>`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snapshot update
"type": "Text", | ||
"raw": "<p>It seems your browser does not support frames or is configured to not allow them.</p>", | ||
"value": { | ||
"type": "Literal", | ||
"value": "<p>It seems your browser does not support frames or is configured to not allow them.</p>" | ||
}, | ||
"attributes": [], | ||
"properties": [], | ||
"directives": [], | ||
"listeners": [], | ||
"children": [ | ||
{ | ||
"type": "Text", | ||
"raw": "It seems your browser does not support frames or is configured to not allow them.", | ||
"value": { | ||
"type": "Literal", | ||
"value": "It seems your browser does not support frames or is configured to not allow them." | ||
}, | ||
"location": { | ||
"startLine": 14, | ||
"startColumn": 12, | ||
"endLine": 14, | ||
"endColumn": 93, | ||
"start": 316, | ||
"end": 397 | ||
} | ||
} | ||
] | ||
"location": { | ||
"startLine": 13, | ||
"startColumn": 15, | ||
"endLine": 15, | ||
"endColumn": 5, | ||
"start": 304, | ||
"end": 406 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Snapshot update
I thought about this some more, and I'm not sure this is the right approach anymore:
|
Thanks @nolanlawson . I'll close this one for now and think about an alternative. |
Details
Closes #4621
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
In dev mode the compiler version comment emitted will be in the format
/*@preserve LWC compiler vX.X.X*/
instead of/*LWC compiler vX.X.X*/
. Tools like Vite and Esbuild will now preserve this comment in dev mode by default (configurable in the tools themselves).GUS work item