Comments (6)
Here you have it using the glob library that uses 16.1k gzipped:
import glob from 'glob';
const pluginsList = [
copy({
targets: [...glob.sync('public/**/*')],
})
]
Then you just need to add it to your config and export it
from rollup-plugin-copy.
Hey,
Yes, I have plans to add glob paths support some time later. Need to test them well too so they don't produce weird results.
from rollup-plugin-copy.
It's probably better to leave this to a third-party lib as @AnthonySLWhite suggests, and just write it as a FAQ in the README, or something with an example or two. Much easier to maintain, much more versatile and configurable, and equally easy to use.
from rollup-plugin-copy.
Just a small update about this one:
When writing v1, I actually tried to use cpy package to copy files which has glob support, but it had some problems I didn't remember. I tried it today and found this problems again (mostly related to creating folders, some mentioned in cpy package issues).
I'll try to just use plain glob, until then try solution from @AnthonySLWhite. If I won't be able to solve this, I'll add a recipe with this solution to readme as @lazarljubenovic suggested.
Thanks to everyone :)
from rollup-plugin-copy.
@vladshcherbin can you release please? We need glob. Thanks.
from rollup-plugin-copy.
Released in 3.0.0 🎉
Thanks to everyone for patience and support. Took a bit longer than I'd expect, but I'm happy I took time to think about api and I'm happy how it turned out.
from rollup-plugin-copy.
Related Issues (20)
- Negated patterns doesn't work correctly. HOT 1
- Has anyone been able to get this working in Sveltekit yet? HOT 3
- copy folder structure with flatten=false and ignore first levels HOT 3
- No error if target file does not exist
- The filter won't take effect when file transformed
- (copy plugin) Error: ENOENT: no such file or directory, chmod <filename> HOT 7
- copy occurs before generated bundle write when multi entry HOT 2
- unable to copy dot files from a directory ie. .htaccess HOT 1
- Symlinks HOT 2
- Move `@types/*` to `devDependencies`. HOT 3
- Create symlink instead of copy?
- Not working well in a Laravel project using Vite HOT 2
- The files in src cannot be obtained under the windows system HOT 3
- Rename does not let me alter the folder to which the file is written. HOT 1
- Please add your oss license text HOT 1
- `rename` option does not work in Rollup 4 HOT 1
- Compile typescript HOT 1
- Breaking dependency [email protected] HOT 3
- [Question] Is it possible to copy to a "hidden" folder?
- Filter Assets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollup-plugin-copy.