> For the complete documentation index, see [llms.txt](https://sugar-at.gitbook.io/blog-article/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sugar-at.gitbook.io/blog-article/webpack/copy-static.md).

# 13. 拷贝静态资源

处理不需要使用webpack统一打包处理或webpack不支持的文件

## 安装

```
npm install copy-webpack-plugin --save-dev
```

## 配置

```javascript
const copyWebpackPlugin=require('copy-webpack-plugin');

module.exports={
    plugins:[
        new copyWebpackPlugin([
        {
            from:__dirname+"/public/jquery.js",
            to:__dirname+"/build/jquery.js"
        },
        {
            from:__dirname+"/public/index.js",
            to:__dirname+"/build/index.js"
        }
        ])
    ]
}
```
