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

Improve rename option JSDoc #125

Open
benzsuankularb opened this issue Aug 10, 2024 · 2 comments
Open

Improve rename option JSDoc #125

benzsuankularb opened this issue Aug 10, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@benzsuankularb
Copy link

benzsuankularb commented Aug 10, 2024

Add the ability to transform file structure.

viteStaticCopy({
  targets: [
    {
      src: [
        'node_modules/my-lib/dist/**/*',
      ],
      dest: '.',
      transformStructure: (path) => path.replace('node_modules/my-lib/dist/', '')
    },
  ],
  structured: true,
}),
@sapphi-red
Copy link
Owner

Won't the rename option work for that?

@sapphi-red sapphi-red added the needs more info Further information is requested label Aug 11, 2024
@benzsuankularb
Copy link
Author

benzsuankularb commented Aug 12, 2024

Ah, I previously saw rename func returning a string,
Not sure what's the return value is expected but thought it was only the filename that could be changed.
So this option should work if rename could recompose the full path here.
We may need some documents for this.

@sapphi-red sapphi-red added documentation Improvements or additions to documentation and removed needs more info Further information is requested labels Sep 12, 2024
@sapphi-red sapphi-red changed the title Transform files structure Improve rename option JSDoc Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants