Expose src folder and sourcemap with the package #3586
Replies: 6 comments
-
|
Hey, could you please share some details why you want/need to check the source code so we can understand the feature request better? Usually, I don't really see a reason why you would need to check the source code since this is internal logic that you shouldn't care about. The types are already provided as well as intense JSDocs |
Beta Was this translation helpful? Give feedback.
-
|
hi, it is bc we want to debug the components. There would be some error that we dont know whether from our code or from Onyx. Without the sourcemap and the src we cannot debug inside and it is like a black box. For instance, right now we are having a bug related to the form and custom error, we see the custom error is correctly passed into Onyx input but it is not shown on the UI as well as does not trigger validity change. Since we cannot debug, we cannot reproduce any minimal reproduction on ur playground as well. |
Beta Was this translation helpful? Give feedback.
-
|
Sounds like a good idea. Most apps will be build with an additional bundler step, which will take care of minification and optimization anyways. Would be interesting to know if we can also use this to only show warnings for dev and have them optimized out at (user/app) build-time. |
Beta Was this translation helpful? Give feedback.
-
|
It is kinda easy to provide sourcemap but still keep the minified version. Just 2 lines of change |
Beta Was this translation helpful? Give feedback.
-
|
We created a research ticket #3435 to look deeper into this, also in the context of some other DX improvments. You can track the progress there. |
Beta Was this translation helpful? Give feedback.
-
|
With version 1.0.0-beta.263 we now provide source-maps and non-minified javascript. @cuonghuunguyen Please let us know, if the new dist code improves your developer experience :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi team,
When I develop the UI with Onyx, I often have to check the source of the component by using IDE navigation to know the underlying logic and the typescript types inside the components. Unfortunately, the package is only shipped with the compiled version and it is very difficult to read. I think it would be easier to use if you could expose the src folder with the sourcemap so I can access it without having to go to this repo every time.
Thank you.
Proposed solution
Expose src folder + ts sourcemap via the package.json's dist attr
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions