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

Gulp5 Support? #55

Open
RickKukiela opened this issue Jul 3, 2024 · 0 comments
Open

Gulp5 Support? #55

RickKukiela opened this issue Jul 3, 2024 · 0 comments

Comments

@RickKukiela
Copy link

I think there might be an incompatibility with the "vinyl" dependency that gulp5 uses..

I did not have this working on Gulp4 or anything, but here is my build process, and from what I can tell, this should work:

    const bundler = browserify({
        entries: bundles[bundleId].jsEntry,
        debug: !isProduction,
        transform: [babelify]
    });
    const outputFile = `${bundleId}-bundle.min.js`;
    const mapFile = `${bundleId}-bundle.js.map`;
    return isProduction ?
        bundler.bundle()
            .pipe(source(outputFile).on('error', errorHandler))
            .pipe(buffer().on('error', errorHandler))
            .pipe(terser())
            .pipe(gulp.dest(jsDest)) :
        bundler.bundle()
            .pipe(source(outputFile).on('error', errorHandler))
            .pipe(buffer().on('error', errorHandler))
            .pipe(exorcist(mapFile))
            .pipe(gulp.dest(jsDest));

The ternary condition when i'm not building "for production" runs the last bundler sequence in which excorcist is piped in.

The error I get in my console from this is:

Error: Received a non-Vinyl object in dest()
at Transform.normalize [as _transform] (C:\Projects\test\gulp\node_modules\vinyl-fs\lib\dest\prepare.js:16:17)
at Transform._write (C:\Projects\test\gulp\node_modules\streamx\index.js:981:12)
at WritableState.update (C:\Projects\test\gulp\node_modules\streamx\index.js:187:16)
at WritableState.updateWriteNT (C:\Projects\test\gulp\node_modules\streamx\index.js:550:10)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

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

1 participant