Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

relative paths question #23

Open
Open
@ericgj

Description

@ericgj

Apologies to ask this support question here, but I didn't see anywhere else to ask. I cannot get browserbuild to work as described in the README. I am sure it's something basic I'm missing.

If I have files b.js and hithere.js as described in the README (all, including the main, in a lib directory), and run browserbuild as described, the output I get looks like this:

// require functions wrapper
require.register("lib/b.js", function(module, exports, require, global){ ... });
require.register("lib/hithere.js", function(module, exports, require, global){ ... });
var exp = require('hithere');if ("undefined" != typeof module) module.exports = exp;else hithere = exp;

And I get an error trying to require('hithere'), since it was registered as 'lib/hithere.js'.

I thought perhaps the base path needed to be provided, e.g. browserbuild -m hithere -b lib ..., but that doesn't work either as it registers it as '/hithere.js' .

The only way I could get it to work is to run within the source dir, e.g. cd lib && browserbuild -m hithere ... .

What am I missing? Thanks in advance.

Eric

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