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
/** * Manages the "See Inside" tour in the location detail widget. */classTour{/** * Constructor. * @param {HTMLElement} tourEl The DOM node for the tour element. */constructor(tourEl){this.element=tourEl;this.modal=this.element.closest('[data-js-modal-wrapper]');this.listenForModalOpen();}/** * Initializes all the tours on the page. */staticinitializeAllTours(){letmaps=document.querySelectorAll('[data-js-see-inside-src]');maps.forEach(x=>{newTour(x);});}/** * Adds the event listener for when the modal dialog opens. */listenForModalOpen(){// Page speed optimization: only set the "src" once the modal opens.this.modal.addEventListener('slideout.open',this.setSrc.bind(this));}/** * Sets the "src" element of the iframe. */setSrc(){letsrc=this.element.getAttribute('data-js-see-inside-src');if(src){this.element.setAttribute('src',src);this.element.removeAttribute('data-js-see-inside-src');}}}// Export the class.exportdefaultTour;
Note that the Tour class is defined twice in the version produced by Terser 4.6.0 (it should not be doing that).
My workaround is to integrate the export default with the initial class definition (rather than placing it at the end of the file), though this should not be necessary.
Some further info:
It looks like Terser 4.6.0 is producing longer names than 4.5.1 (e.g., "Tour" rather than "e").
Bug report
I have this JavaScript class:
Here's what Terser 4.5.1 turns that into:
Here's what Terser 4.6.0 turns that into:
Note that the
Tour
class is defined twice in the version produced by Terser 4.6.0 (it should not be doing that).My workaround is to integrate the
export default
with the initial class definition (rather than placing it at the end of the file), though this should not be necessary.Some further info:
Complete CLI command or
minify()
options usedHere is the Node JavaScript I'm using:
The
isModule
variable is set to true in this case.The text was updated successfully, but these errors were encountered: