NakedJSX/core

Feature request: PrependJs

Closed this issue · 4 comments

Is there an option to control order when -client.js code is added to a script tag? I want to AppendJs to add code before appending code from dedicated -client file.
There is ways to solve my problem without this feature, but I thought that this may be an useful one.

dqh-au commented

Hm there isn't a setting for that although it wouldn't be hard to add one. I guess the obvious workaround would be to place all -client.js code with side effects into a function in -client.js, then call that function when you like via one of the AppendJs options.

Yes, this approach works well!

Should I close this issue or you will think of adding this feature?

dqh-au commented

I think for now the approach I described is a good way to handle this situation, so yeah lets close this one.