Skip to content
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

copy只支持string[],在需要转换文件名或者目录层次上不太方便,是不是可以扩展到也支持{from:string,to:string}[] #1416

Open
303394539 opened this issue Jul 17, 2024 · 5 comments · May be fixed by #1711
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@303394539
Copy link

如题

@stormslowly stormslowly added enhancement New feature or request good first issue Good for newcomers labels Jul 17, 2024
@PeachScript
Copy link
Member

@stormslowly will provide a rfc

@xiaohuoni
Copy link
Member

类似这样子,string[] 应该怎么写?
copy: [
{
from: path.join(
path.dirname(require.resolve('pdfjs-dist/package.json')),
'cmaps',
),
to: 'build/static/cmaps/',
},
],

@BQXBQX
Copy link

BQXBQX commented Dec 2, 2024

I noticed that the current copy configuration only supports basic string arrays, which can be limiting when we need more control over file destinations. This PR enhances the copy functionality to support both basic and advanced configuration modes.

🎯 What's Changed:
• Added support for advanced copy configuration with custom target paths
• Maintained full backward compatibility with existing string[] format
• Added automatic target directory creation

📝 Example Usage:

{
  "copy": [
    "public",                           // Basic mode (backward compatible)
    {                                   // Advanced mode
      "from": "assets",
      "to": "static"
    }
  ]
}

@BQXBQX
Copy link

BQXBQX commented Dec 2, 2024

#1711

@wjywy
Copy link

wjywy commented Dec 13, 2024

你好,这个issue有人认领吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants