Skip to content

r js stops loading dependecies of module when i use specific module name for that file. #1001

@sohankd

Description

@sohankd

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';

return Marionette.Application.extend({});`
  1. When i hit this command 'r.js -o build.js' in cmd prompt, it stops loading modules after application module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions