Opened 7 years ago

Closed 7 years ago

#15103 closed defect (fixed)

[patch][cla] fix loader baseurl to work in nodejs when dojo is symlinked

Reported by: ben hockey Owned by: Rawld Gill
Priority: low Milestone: 1.8
Component: Loader Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

when using dojo in node from a symlink, the baseUrl is the real path rather than the symlink path. the patch below would set the baseUrl to match the location of the dojo.js that was passed via the command line

  • _base/configNode.js

     
    4040               config.hasCache[p] = hasCache[p];
    4141       }
    4242
    43        var vm = require('vm');
     43       var vm = require('vm'),
     44               path = require('path');
    4445
    4546
    4647       // reset some configuration switches with node-appropriate values
    4748       var nodeConfig = {
    48                baseUrl: __dirname.match(/(.+)[\/\\]_base$/)[1],
     49               baseUrl: path.dirname(process.argv[1]),
    4950               commandLineArgs:args,
    5051               deps:deps,
    5152               timeout:0,

Change History (3)

comment:1 Changed 7 years ago by ben hockey

Summary: [patch][cla] fix loader baseurl to work in nodejs when dojo is synlinked[patch][cla] fix loader baseurl to work in nodejs when dojo is symlinked

comment:2 Changed 7 years ago by Rawld Gill

Milestone: tbd1.8
Priority: undecidedlow
Status: newassigned

comment:3 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [28428]:

improves baseUrl detection with node.js; thanks neostalwart; fixes #15103

Note: See TracTickets for help on using tickets.