Anyone who has built a suitelet with a react app? ...
# suitescript
f
Anyone who has built a suitelet with a react app? Uploading the files and updating the path to my js and css files in build is quite messy. Any tip how to make that easier?
s
Use Angular instead.
m
I use a function to find the file URL by filename dynamically so no matter which customer environment the app is installed in, the Suitelet can find the URL for .js and .css files. https://github.com/datatek-software/netsuite-react-order-entry/blob/master/Apps/react-order-entry/order-entry.suitelet.js
🙌 2
r
We have done it with Vue apps by building the entire app into a single file using one of the below plugins. Webpack: https://www.npmjs.com/package/html-webpack-inline-source-plugin?activeTab=readme Vite: https://www.npmjs.com/package/vite-plugin-singlefile
🙌 1
f
@Shawn Talbert Reasoning behind Angular would be appreciated @Mike Robbins @Richard Tanner Tips made of gold, thank you both a ton!
s
We've used a few different frameworks for this and Angular seems best fit for our needs. It also defaults to building a solution that is only a few files, and by default your 'app' goes into only one file. So that makes it easy to update the NS file cabinet. Also being TS throughout, it is easy and natural to have strongly typed request/responses for our API backend