Have ideas to improve npm?Join in the discussion! »

webpack-copy-file-plugin

0.1.5 • Public • Published

webpack插件,将指定文件拷贝到打包目录下

install

$ npm i webpack-copy-file-plugin -D

Example

const CopyFilePlugin = require('webpack-copy-file-plugin');
 
{
    // ...
    plugins: [
        // ... other plugins
        new CopyFilePlugin([
            './LICENSE',
            './package.json'
        ].map(f => path.resolve(__dirname, f))), // 放在其它插件的后面
    ],
    output: {
        filename: '[name].js',
        path: path.resolve(__dirname, 'dist'),// 需要设置打包目录
    },
}

Install

npm i webpack-copy-file-plugin

DownloadsWeekly Downloads

7

Version

0.1.5

License

MIT

Unpacked Size

2.84 kB

Total Files

4

Last publish

Collaborators

  • avatar