tech-systems / panes

🎉📱 Create dynamic modals, cards, panes for your applications in few steps. One instance – Thousands solutions. Any framework and free.
https://panejs.com
MIT License
681 stars 40 forks source link

[BUG] Vite uglify modules names #232

Open bazuka5801 opened 7 months ago

bazuka5801 commented 7 months ago

Describe the bug Vite uglify modules names, I wrote workaround for finding module.

 let newPaneHeight =
    (await pane.modules.fitHeight.getPaneFitHeight()) as number
  let fitHeightModule = pane.modules.fitHeight
  if (!fitHeightModule) {
    for (const key in pane.modules)
      if (typeof pane.modules[key].calcFitHeight === 'function') {
        fitHeightModule = pane.modules[key]
      }
  }

  let newPaneHeight = (await fitHeightModule.getPaneFitHeight()) as number

To Reproduce Steps to reproduce the behavior:

  1. vite build Expected behavior modules not uglify

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

roman-rr commented 7 months ago

Thank you @bazuka5801 Maybe you have some suggestions here?

bazuka5801 commented 7 months ago

Thank you @bazuka5801 Maybe you have some suggestions here?

https://stackoverflow.com/a/62471619