'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,
wwwrootTwilioVideoindex.jsmain.jsrequire.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!
Solution 1:[1]
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 () {
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yiyi You |
