This is a Parcel v2 plugin for copying multiple static files.
Forked from this plugin.
Yarn
$ yarn add -D parcel-reporter-multiple-file-copier
NPM
$ npm install parcel-reporter-multiple-file-copier --save-dev
Configuration is set under staticFiles
in package.json
. It must be an array of objects containing origin
and destination
props:
Property | Path |
---|---|
origin | Example: node_modules/@package/public |
destination | Example: public |
You .parcelrc
:
{
"reporters": [
"...",
"parcel-reporter-multiple-file-copier"
]
}
*Note that the "..." notation is used to keep the default report plugins loaded by Parcel.
This example will copy the contents of the folder public into the folder DIST_DIR_PATH/public. (Note that the DIST_DIR_PATH is specified by Parcel, you don't need to pass it)
package.json
{
"staticFiles": [
{
"origin": "public",
"destination": "public/"
}
]
}