Skip to content

vite-plugin-static-copy@4.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Apr 11:07
e95cd6e

Minor Changes

  • #251 7672842 Thanks @sapphi-red! - Add name property to the rename object form and allow rename functions to return a RenameObject. The name property replaces the file's basename (filename + extension), and can be combined with stripBase to both flatten directory structure and rename the file in one step. Rename functions can now return { name, stripBase } objects instead of only strings, making it easier to declaratively control output paths from dynamic rename logic.

    // node_modules/lib/dist/index.js → vendor/lib.js
    { src: 'node_modules/lib/dist/index.js', dest: 'vendor', rename: { name: 'lib.js', stripBase: true } }
    
    // src/pages/events/test.html → dist/events/index.html
    { src: 'src/pages/**/*.html', dest: 'dist/', rename: { stripBase: 2, name: 'index.html' } }