Skip to content

source map outputs '\\' but not '/' in the sources path list on Windows #4

Closed
@benxshen

Description

@benxshen

Here is my simple gulpfile, just copying from the given sample of simplifyify README.md:

var gulp        = require("gulp"),
    simplifyify = require("simplifyify");   // https://www.npmjs.com/package/simplifyify

gulp.task("browserify", function(done) {
  simplifyify("app.js",
    {
        outfile: "bundle.js",
        debug: true,
        minify: true
    })
    // .on("end", function() {
    //     // Finished successfully!
    //     done();
    // })
    .on("error", function(err) {
        // Something went wrong
        done(err);
    });
});

And the output of the bundle.js.map as below (my OS is Windows 10 64bit)

  "version": 3,
  "sources": [
    "node_modules\\browserify\\node_modules\\browser-pack\\_prelude.js",
    "app.js",
    "buttons\\button.js",
    "node_modules\\jquery\\dist\\jquery.js"
  ],
  ...

however, if I use browserify app.js --debug | exorcist bundle.js.map > bundle.js, I will get as follow:

  "version": 3,
  "sources": [
    "node_modules/browserify/node_modules/browser-pack/_prelude.js",
    "app.js",
    "buttons/button.js",
    "node_modules/jquery/dist/jquery.js"
  ],
  ...

I think the output path of the source with '' will be not correct when I deploy them to the server. Is it a bug? or where can I have an option to make the path separator to '/', but not system default sep ''?

Thank you.

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