Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

36
Views
index.js not loading from main.js

I am working on a .net core MVC application. where I have integrated Twilio Video functionality. In Views/Video/index.cshtml, reference for require js added like this,

<script data-main="../TwilioVideo/main" src="~/TwilioVideo/require.js"></script>

folder structure is like,

  • wwwroot
    • TwilioVideo
      • index.js

      • main.js

      • require.js

and the main.js file contains code,

    require.config({
paths: {
    "twilio-video": "https://media.twiliocdn.com/sdk/js/video/releases/2.4.0/twilio-video.min"
}
});
require(["index"], function () {

});

when I run the code index file not loading, in the source I can only see main.js and require.js. someone, please help me to understand what might be the issue?

Thanks in advance!

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

You can try to use code like this:

require.config({
            paths: {
                "twilio-video": "/TwilioVideo"//It's the path of TwilioVideo folder
            }
        })
        require(["twilio-video/index"], function () {

        });
7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs