Reputation: 156
I'm impressed with the ability in netsuite to render custom html directly in the NS environment, and i would like to embed a Flutter web app now.
I am having difficulty getting everything to load, however. Flutter Web is a static web app, so theoretically I should be able to add it to NS, but i am having difficulty loading the required files / js. My Question is one of technique / approach on how to get this to work.
the suitelet is served from a url+query param similar to https://{mytenant}.netsuite.com/scriptlet.nl?script=1234
Is it possible to reduce flutter web to a single html / js file? I tried to use ESBuild to reduce to a single file, but the bootstrap script loads other scripts by file name, and ESBuild is unable to unpack this.
Is it reasonable to make the suitelet serve the required files, and route file requests to the suitelet rather than using typical web syntax to request support js etc.? I have attempted this, but ran into problems around the url containing query parameters.
Id be happy for any input on technique.
Upvotes: 0
Views: 34
Reputation: 15447
I've done this with Dust (a handlebars competitor) because it had a file loader extension. I've done this with React and preact with webpack because it can be configured to produce a single file for the application with no chunks.
Unless Flutter has a file loader extension or you can inject the needed resources with script tags into an inline HTML field you may be out of luck.
Are you trying to extend the NetSuite UI or publish a page externally for customer/vendor use?
Upvotes: 0