You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Not able to import external js file in to VBCS

edited Sep 18, 2019 11:18AM in Visual Builder 30 comments

Summary

Not able to import external js file in to VBCS

Content

HI,

I have followed the below url and tried, its not working for me.

https://blogs.oracle.com/vbcs/importing-and-using-javascript-libraries-in-your-visual-builder-custom-code

Imported gl-matrix.js as shown in attached file.

Below is the js code.

define(["flows/main/resources/gl-matrix"],
  function(glmatrix) {
    'use strict';

    var PageModule = function PageModule() {};

    PageModule.prototype.testFun = function() {
      var filesArr = [];
     
      var myVce3 =  glmatrix.vec3.create();
      glmatrix.vec3.set(myVce3, 0, 2.0);
      return myVce3;
    }
    return PageModule;
  });

But I'm getting the below error.

 

 

 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!