gulp-parcel icon indicating copy to clipboard operation
gulp-parcel copied to clipboard

scss error?

Open kylegoines opened this issue 6 years ago • 3 comments

Hello I seem to be throwing errors even though compliation seems to be happending correctly

this:

gulp.src('_scss/main.scss', {read:false})
            .pipe( parcel( { outDir: 'dist' } ) )
            .pipe( gulp.dest('dist') )

compiles and works with scss but after hanging for a second i seem to be getting an unhanded promise error

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
...
/node_modules/gulp-parcel/index.js:112
						throw err;
						^

kylegoines avatar Jun 19 '18 21:06 kylegoines

to clarify, this is comping to css correctly but is halting my watch task. any help would be great :)

kylegoines avatar Jun 19 '18 21:06 kylegoines

same problem here

a65162 avatar Jun 22 '18 07:06 a65162

After looking at the code behind gulp-parcel, this just seems to be completely busted.

Basically, gulp-parcel incorrectly computes out_flname -- it assumes that the output filename has the same extension as the input: for instance, if you start with main.js, you'll end with main.js. You can see the computation of out_flname here.

At the same time, it's clear that the author recognized this issue, but not in the general case: if you look further below in gulp-parcel's index.js you can see where the code explicitly looks for the .pug extension in the input file name, and rewrites the output file name to .html so that no exception gets thrown.

Bottom line: we're not quite ready for prime time. Will have to look elsewhere or submit a PR...

davepeck avatar Aug 30 '18 16:08 davepeck