Skip to content

Incorrect filename option "?" set in UglifyJS.parse #576

@manubo

Description

@manubo

In the function tools/node.minify the filename property is set as follows:

toplevel = UglifyJS.parse(code, {
  filename: options.fromString ? "?" : file,
  toplevel: toplevel
});

This results in the error gulp-sourcemap-write: source file not found: /srv/www/project/src/js/? when browserifying and minifying the application sources.

gulp.task('build-iaso', ['react'], function () {
  var bundler = browserify({ //browserify@6.2.0
    entries: [config.files.app],
    debug: true
  });

  bundle = function () {
    bundler.bundle()
    .pipe(source('app.js')) //vinyl-source-stream@1.0.0
    .pipe(buffer()) //vinyl-buffer@1.0.0
    .pipe(sourcemaps.init({ laodMaps: true })) //gulp-sourcemaps@1.2.4
    .pipe(uglify()) //gulp-uglify@1.0.1
    .pipe(sourcemaps.write('./'))
    .pipe(gulp.dest(config.path.dist + '/js'))
};

  return bundle();
});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions