Closed hwmaier closed 3 years ago
I deeply apologize for the delay in merging this @hwmaier. I had some watch settings for repositories that were burying notifications for this repo and it slipped.
I published an update to this package you may use to test. To ensure I don't unintentionally break dependent applications through a normal install, I published a version containing these (and other) proposed changes to the package's next
tag, which you can install as npm i rollup-plugin-imagemin@next
. Once you (and other PR submitters) are satisfied, I will republish the package without the next
tag.
Please also note that, due to a recently added warning in Rollup, the default export has been dropped and is now a single named export named imagemin
. You can check the README for exact usage details.
Without this mod, the plugin will not work with Vite on Windows as Vite does not pass down a drive letter and the path has Unix style separators. As a result on Windows filter matching (
include
,exclude
patterns) is broken and also thepreserveTree
configuration parameter won't match. Once the id is converted to the native representation, include/exclude filters work and also thepreserveTree
configuration can be set for example topreserveTree: 'src'
which will nicley regenerate the relative path structure in a Vue/Vite project, sosrc/assets/image.png
becomesdist/assets/image.png
.