Closed Lobstrosity closed 7 years ago
@Lobstrosity Could you rebase on top on master
Tests are failing on my side
@a-x-
Tests are failing on my side
Also are you :100: it's not a breaking change?
I not 100% sure, but I saw passed tests (after rebase as I understood) and code likes good It can breaks usage relied on buggy behavior probably.
Excuse me if you want to test it better
fine :) can you fix the tests please
@a-x- And next time can you squash it instead of merging the PR, it makes thinks look nicer :)
hey there was a deep evening at here yesterday :) I see you fix tests yourself now.
I checked locally, everything passes 👍 I just don't understand why was tests in CI good
I just don't understand why was tests in CI good
Weird, I think you got confuse with code approval checks :p
This caused an issue see #62 , we need to find a workaround to fix this issue while keeping urls safe
When populating the manifest, resolves
basePath
/publicPath
withkey
/value
(to resolve parent directory references).So
/base/subfolder/../file.ext
becomes/base/file.ext
.Side benefit is trailing slashes on
basePath
/publicPath
are now optional sincejoin
takes care of that for you.Note that it uses
path.normalize(path.join())
instead ofpath.resolve()
so that ancestors ofbasePath
/publicPath
are not exposed. (The approach could be simplified if that’s not a concern.) This results in invalid paths if an absolute path is specified with several parent directory references. E.g.,resolvePath('/absolute/../..', 'file.ext')
returns'/file.ext'
(not valid), whereasresolvePath('relative/../..', 'file.ext')
returns'../file.ext'
.My particular use case was with
sass-loader
plusfile-loader
to export CSS-referenced images.sass-loader
processing SCSS to/static/css
.file-loader
processing images withoutputPath=../images/
(which was relative to CSS output, so/static/images
).webpack-manifest-plugin
withbasePath
of/static/css/
so that the manifest paths were absolute.Before this change, an image would appear in the manifest as
/static/css/../images/file.ext
. With this change, it appears as/static/images/file.ext
.