Skip to content

Commit bbf687b

Browse files
committed
minor #443 Improve copyFiles method examples #2 (kapiwko, weaverryan)
This PR was merged into the master branch. Discussion ---------- Improve `copyFiles` method examples #2 Like in #442 Fix also `to` option in examples - paths are relative to build dir, not root dir. Commits ------- 4b2ceda clarifying comment 676afcb Improve `copyFiles` method examples #2
2 parents 2b623f7 + 4b2ceda commit bbf687b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -441,13 +441,14 @@ class Encore {
441441
* Encore.copyFiles({
442442
* from: './assets/images',
443443
* pattern: /\.(png|jpg|jpeg)$/,
444-
* to: 'assets/images/[path][name].[ext]'
444+
* // to path is relative to the build directory
445+
* to: 'images/[path][name].[ext]'
445446
* })
446447
*
447448
* // Version files
448449
* Encore.copyFiles({
449450
* from: './assets/images',
450-
* to: 'assets/images/[path][name].[hash:8].[ext]'
451+
* to: 'images/[path][name].[hash:8].[ext]'
451452
* })
452453
*
453454
* // Add multiple configs in a single call

0 commit comments

Comments
 (0)