Josee9988 / MinifyAll

A 𝗩𝗦𝗖𝗼𝗱𝗲 𝗺𝗢𝗻𝗢𝗳𝗢𝗲𝗿 for JS, JSON/C, CSS, and HTML, you will love its simplicity! 🌟 π˜Ύπ™€π™’π™₯π™§π™šπ™¨π™¨ and π™œπ™―π™žπ™₯ files and folders πŸ“¦ Reduce your bundle and file sizes with lightning speed ⚑
https://minifyall.jgracia.es/
GNU General Public License v3.0
71 stars 10 forks source link

[Bug] Minifying fails for dynamic JS import #152

Closed simonferndriger closed 1 year ago

simonferndriger commented 1 year ago

🐞 Bug Report

Describe the bug

When you have a JS file with the following content, the minifying fails with an error: if(typeof structuredClone !== 'function'){ const { structuredClone = (await import('https://cdn.skypack.dev/@ungap/structured-clone')).default } = self; }


Is this a regression?

No

To Reproduce

  1. Enter de JS code above in your script
  2. Use minifyer with VS code (online version is not available currently: https://minifyall.jgracia.es/)
  3. See error --> image

Expected behaviour

It should minify or is there something wrong with this import statement?


Your environment


Thank you for looking into this, otherwise your plugin is awesome! πŸ₯³

welcome[bot] commented 1 year ago

Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers!

simonferndriger commented 1 year ago

Looks like the JS was indeed incorrect, sorry