Skip to content

#8 Write transforms : Absolute paths? #8

@mdda

Description

@mdda

I successfully got the #8 solution going, both with the 'direct' through way, and the 'combining' way. However, there seems to be a problem if the 'main.js' file has an absolute include vs a relative include :

// This fails
//var txt = require("/usr/lib/node_modules/browserify-adventure/problems/writing_transforms/wake.txt");
// This works (assuming the wake.txt is copied from the path above to the local directory
var txt = require("./wake.txt");
console.log(txt);

The verification stage works fine, though I see from your solution source that there's a relative file require there too. Am I crazy, or does something different happen in the case of absolute paths?

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