Apologies if this is just my lack of understanding - I've been round in circles in the documentation so many times now.
I have a client side script that I am adding to a Suitelet through form.clientScriptModulePath and pointing to the file in the SuiteScripts folder. This works fine until I bundle the project and install it in another account and the path to the script changes.
I have resolved this issue by pointing to the SuiteBundles/bundle id folder. Obviously I need to know the bundle id for this to work though. I can see this causing issues in the future.
This help article - https://tstdrv2611574.app.netsuite.com/app/help/helpcenter.nl?fid=section_4288167433.html - suggests I use a descriptive url referencing the target account in this format - https://system.netsuite.com/c.<account ID>/suitebundle<bundle ID>/<folder>/<subfolder>/<file>.<ext> using a couple of methods from script and runtime.
It mentions vaguely that the files need to be in the Website hosting/live hosting files folder - how does this relate to the target account? My development account doesn't have the html file hosting feature enabled, I guess because it doesn't have the sitebuilder feature enabled? Would that be why?
If that feature was enabled, and I could access the relevant folder, could someone describe to me how it works perhaps? I attempted it with a training account I have with that feature enabled and still wasn't able to get it to work.
My current workaround involves a try/catch so if one file path is incorrect and form.clientScriptModulePath assignment causes an error, it uses the other path so my suitelet works in development and after being installed through a bundle.
Could someone help me understand the common solution to this please?