Miss any of our Open RFC calls?Watch the recordings here! »

parcel-plugin-resources

1.0.0 • Public • Published

parcel-plugin-resources

Parcel plugin to watch and copy resources to the Parcel bundle directory. This plugin is actually just a thin wrapper for the cpx module.

By default, this plugin recursively copies all files from <rootDir>/resources into <bundleDir>/resources. The <rootDir> is the directory which contains your entry asset. If your entry asset is my/project/index.js, then the <rootDir> is my/project.

If parcel is started as a local development server, then all resources will be watched and automatically re-copied when changed, added, or removed.

Getting Started

Install the plugin:

yarn add --dev parcel-plugin-resources

Or

npm install --dev parcel-plugin-resources

Parcel will automatically detect the plugin.

Configuration

If you need to change the resource glob pattern or destination directory, you can add the following to your package.json.

{
  ...
  "resources": {
    "glob": "resources/**",
    "destination": "resources"
  }
}

Default values are shown above.

Install

npm i parcel-plugin-resources

DownloadsWeekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

3.05 kB

Total Files

4

Last publish

Collaborators

  • avatar