thisbeyond / solid-dnd

A lightweight, performant, extensible drag and drop toolkit for Solid JS.
https://solid-dnd.com
MIT License
516 stars 34 forks source link

Separate development and production entries #80

Closed thetarnav closed 1 year ago

thetarnav commented 1 year ago

Fixes #79

Uses tsup and tsup-preset-solid for building library. It generates dev entry with preserved console.logs and index (production) with console calls removed.

martinpengellyphillips commented 1 year ago

I'll aim to test and merge this by end of week.

Out of interest @thetarnav - will this also resolve this class of issue that keeps coming up for folks: #78

thetarnav commented 1 year ago

What can I do to reproduce this issue (haven't seen it before)?

martinpengellyphillips commented 1 year ago

Someone shared this repro https://stackblitz.com/edit/github-sadxvo?file=package.json - look in the console to see error. The general fix is to add the following to vite config, but I'm curious if there is something we can do in this package to mitigate.

  optimizeDeps: {
    extensions: ['jsx'],
  },
thetarnav commented 1 year ago

Ok I think it does resolve it Downloaded the project - the same error Linked the newly built package - no error I don't understand what exactly is causing the issue, but I expect it had something to do with mixed .js and .jsx files in the /source output. Now there is a single file for each entry so everything is transformed equally.

martinpengellyphillips commented 1 year ago

Ah, that's great - it's the most frequent stumbling block for folks so good to get it solved. Thanks for testing!

martinpengellyphillips commented 1 year ago

Thanks again for this - released now.