https://github.com/best-shot/copy-webpack
A simple `copy-webpack-plugin`
https://github.com/best-shot/copy-webpack
copy copy-webpack-plugin globs webpack webpack-plugin
Last synced: 10 months ago
JSON representation
A simple `copy-webpack-plugin`
- Host: GitHub
- URL: https://github.com/best-shot/copy-webpack
- Owner: best-shot
- License: mit
- Created: 2020-08-02T06:53:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T04:24:13.000Z (over 1 year ago)
- Last Synced: 2025-02-25T23:46:23.832Z (11 months ago)
- Topics: copy, copy-webpack-plugin, globs, webpack, webpack-plugin
- Language: JavaScript
- Homepage:
- Size: 623 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# copy-webpack
A simple [copy-webpack-plugin].
[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge]
[copy-webpack-plugin]: https://github.com/webpack-contrib/copy-webpack-plugin
[npm-url]: https://www.npmjs.com/package/copy-webpack
[npm-badge]: https://img.shields.io/npm/v/copy-webpack.svg?style=flat-square&logo=npm
[github-url]: https://github.com/best-shot/copy-webpack
[github-badge]: https://img.shields.io/npm/l/copy-webpack.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/copy-webpack.svg?style=flat-square&colorB=green&logo=node.js
## Installation
```bash
npm install copy-webpack --save-dev
```
## Usage
```cjs
// example: webpack.config.cjs
const { CopyWebpack } = require('copy-webpack');
module.exports = {
plugins: [new CopyWebpack('static')]
};
```
## Options
Glob or path from where we copy files.
`string` `object` `[string|object]`
```diff
- new CopyWebpackPlugin({
- patterns: [
- {
- from: 'static',
- globOptions: {
- dot: true,
- ignore: ['.gitkeep']
- }
- }
- ]
- });
+ new CopyWebpack('static');
```
```diff
- new CopyWebpackPlugin({
- patterns: [
- {
- from: 'extra',
- noErrorOnMissing: true,
- globOptions: {
- dot: true,
- ignore: ['.gitkeep']
- }
- }
- ]
- });
+ new CopyWebpack([
+ {
+ from: 'extra',
+ noErrorOnMissing: true
+ }
+ ]);
```