1. Webpack Copying files

Source: Internet
Author: User

--save-dev copy-webpack-plugin
2. var CopyWebpackPlugin = require(‘copy-webpack-plugin‘);
3. new CopyWebpackPlugin([ {from: ‘./ip.txt‘, to:‘ip.txt‘} ]);
=======
from    定义要拷贝的源目录           from: __dirname + ‘/src/public’to      定义要拷贝到的目标目录     from: __dirname + ‘/dist’toType  file 或者 dir         可选,默认是文件force   强制覆盖先前的插件           可选 默认falsecontext 可选 默认base context可用specific contextflatten 只拷贝文件不管文件夹 默认是falseignore 忽略拷贝指定的文件 可以用模糊匹配
 

 

1. Webpack Copying files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.