Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-pure-cjs + gulp-uglify + gulp-sourcemaps fails #5

Open
QuentinRoy opened this issue Feb 7, 2015 · 1 comment
Open

gulp-pure-cjs + gulp-uglify + gulp-sourcemaps fails #5

QuentinRoy opened this issue Feb 7, 2015 · 1 comment

Comments

@QuentinRoy
Copy link

When gulp-pure-cjs is piped to gulp-uglify while source maps are being kept updated, it fails.

gulp.task('min', function(){
    return gulp.src([sources])
        .pipe(sourcemaps.init())
        .pipe(pure(config))
        .pipe(uglify())
        .pipe(sourcemaps.write('.')
        .pipe(gulp.dest('dist'));
});

It seems that uglify cannot find the source file to put in the source maps after pure-cjs...
The only way I found to successfully uglify the pure-cjs build is to insert an empty gulp-concat after it (but it adds an inexistant source to the source maps).

@QuentinRoy QuentinRoy changed the title gulp-pure-cjs + gulp-uglify + gulp-sourcemaps fail gulp-pure-cjs + gulp-uglify + gulp-sourcemaps fails Feb 7, 2015
@richard-flosi
Copy link

this is probably related to the Beware notice in the README:
"pure-cjs always re-read files from disk, so if you load other plugin in pipeline that changes file content, this changes will be lost!"

It sounds like pure-cjs isn't reading or writing streams which is what gulp.pipe expects from my understanding, but I'm still pretty new to using gulp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants