How do I handle inline code when using RequireJS Optimization ?
Along with a bunch of individual JavaScript files that are loaded via RequireJS, I have an object defined in my ASPX file.
<script> define('PageData', function(){ return { target: <%=_target%>, permissions: <%=_permissions%> }; }); </script>
This object contains page load data and is required for many of my files.
Of course, when I try to use Optimization, he complains because he can not find either the module that is defined as PageData, or a file named PageData.js.
Is there a way to ignore this dependency?
source share