-
Notifications
You must be signed in to change notification settings - Fork 103
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
Leading slash added to filenames under gulp 4 #164
Comments
To add some confusion, the tests for this package use vinyl 2. As a result, they have been written to accommodate the regression. I really don't think they should expect URLs with leading slashes for the template filenames, as that doesn't match the behavior observed when running this plugin with gulp 3. |
Reopening due to breaking change with Gulp 3 after fixing this for Gulp 4 in 2.2.4. The code has since been reverted and 2.2.5 was published to reestablish status quo prior to this fix. |
This is a problem, it's breaking all our builds now >.< |
@adamreisnz, but works when you continue to use |
Yes that's right. We had 2 repositories actually with a similar build process, and one of them didn't have the Once we put the transformUrl in place it was working again. |
Ugh! I'm sorry for the wasted time. |
No worries, these things happen 👍 |
This is exactly what I'm dealing with right now. I'm upgrading dependencies of a legacy project, and upgrading gulp3->gulp4 mysteriously broke the site. |
Same happened to me. Fixed by using 2.2.4 (i had v2.2.6). |
I see that 3.0.0 still is exhibiting this issue.. So I'm assuming that till whenever, that going back to 2.2.4 is still recommended? |
Can you use the |
Hope it helps (gulp v4) gulpfile.js
|
I incurred in this problem today migrating from gulp 3.9.1 to gulp 4.0.2 The ie instead of:
you get:
To make
|
Ugh, this bug did cost me hours and was a pain until I found the above temporary solution. But really, this should be fixed eh? |
@binarykitchen what was solution you take to remove the slash. i just need to remove the slash . |
@roman-rr that solution doesn't work |
Thx, transformUrl fix worked just fine for our legacy solution I just upgraded to Gulp v4. |
@sblandin2018 Not working on osx. use this: transformUrl: function (url) {
return url.replace(/^\//, '');
} |
Calling this package with gulp 4 erroneously results in template filenames with leading separators.
This seems to be due to the breaking change in vinyl, where internal path records such as
file.base
are now normalized: gulpjs/vinyl@9ae7cd1#diff-c49ce3c4dfcfa830e06789881dd4d5d4That change breaks the following code:
url = path.join(root, file.path.replace(base || file.base, ''));
It is the root cause of #153
I posted a workaround in the other issue, but I'll see if I can cook something up that's compatible with all vinyl versions instead
The text was updated successfully, but these errors were encountered: