Skip to content

Commit 2021440

Browse files
committed
fix: filter won't apply when transformed
fix vladshcherbin#59
1 parent 507bf5e commit 2021440

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ export default function copy(options = {}) {
112112
const { contents, dest, src, transformed } = copyTarget
113113

114114
if (transformed) {
115-
await fs.outputFile(dest, contents, restPluginOptions)
115+
if (!restPluginOptions.filter || restPluginOptions.filter(src, dest)) {
116+
await fs.outputFile(dest, contents, restPluginOptions)
117+
}
116118
} else {
117119
await fs.copy(src, dest, restPluginOptions)
118120
}

0 commit comments

Comments
 (0)