Now that NetSuite is supporting require I wanted to see if it's possible to dynamically load CSS like a javascript file (using require) in the file cabinet.
I was thinking about creating a custom UI component that when required would add an element to the DOM. Adding the element to the DOM is easy but what if the UI component has a CSS file in the file cabinet. Since the sandbox change in 2017.2 or 2017.1 if I want a file to be available only while authenticated I can no longer have one url to that file in the file cabinet that works both on production and sandbox.
Is there a way to reference other resources like CSS, images etc in the file cabinet without making those resources available without login? I'm more or less thinking a require for a CSS File where I can load the file on the client side like a javascript file from the file cabinet
For example
require(['/SuiteScripts/CSS/somestyles.css'], function (){}); Again, I know making the CSS file available without login will give me a solution and while I really don't care that my CSS file would be accessible by anyone on a NetSuite server some where I was curious if this can be done without making the CSS file available without login and while still working on both production and on the sandbox.Thanks,John