You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i assign different module name's to files, both r.js and requirejs stops loading the dependcies even if the dependecies are assigned with relative url instead of their module name.
The below code thows an error like 'Application is not a constructor' when add the application module as a depency in require call with its name and run it locally.
var app = require('Application');
console.log(new app()); //throws Error: Application is not a constructor.
I had bad experience with including the same module by different paths. I assigned the path roots aliases using paths in require.config like lib: '../vendors'. I included the modules always by the same names (paths) starting with the alias prefixes like lib/backbone and lib/marionette.
When i assign different module name's to files, both r.js and requirejs stops loading the dependcies even if the dependecies are assigned with relative url instead of their module name.
The below code thows an error like 'Application is not a constructor' when add the application module as a depency in require call with its name and run it locally.
var app = require('Application');
console.log(new app()); //throws Error: Application is not a constructor.
Application.js
`define('Application',
[
'../../Layout/JavaScript/Layout.View'
, '../../../starter'
, 'backbone'
, 'Marionette'
]
, function
(
Layout
, starter
, Backbone
, Marionette
)
{
'use strict';
The text was updated successfully, but these errors were encountered: