-
Notifications
You must be signed in to change notification settings - Fork 439
Closed
Description
If a component author does something like the following:
import { LightningElement } from 'lwc';
const tmpl = undefined;
const generateMarkup = undefined;
export default class extends LightningElement {
connectedCallback() {
// just use the variables to avoid them being tree-shaken
Object.assign(
{},
{
tmpl,
generateMarkup
}
);
}
}Then currently, it will throw an error at compile time in the @lwc/ssr-compiler:
Identifier "tmpl" has already been declared
Identifier "generateMarkup" has already been declared
These are pretty generic names, so we should probably switch to something like __lwcTemplate and __lwcGenerateMarkup to avoid collisions.
Related:
Reactions are currently unavailable