Giter Site home page Giter Site logo

jackypan1989 / del-webpack-plugin Goto Github PK

View Code? Open in Web Editor NEW
42.0 4.0 8.0 727 KB

A file plugin help you remove old files after webpack (v5) bundling

Home Page: https://www.npmjs.com/package/del-webpack-plugin

License: MIT License

JavaScript 26.30% TypeScript 73.70%
webpack webpack-plugin plugin es6 cleaner trash del-webpack-plugin

del-webpack-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

del-webpack-plugin's Issues

extra dependencies?

from the code, it seems that only 'del' and 'chalk' are dependencies, others should be 'devDependencies'.

files in output will been default exclude?

I want to delete files in output path, but I see the source code has auto ignore the files in output path

// exclude files
const excludePatterns = [
  outputPath,
  ...this.options.exclude.map(name => path.join(outputPath, name)),
  ...assetNames.map(name => path.join(outputPath, name))
]

need include option

Very often I could put unneeded files into a single directory ("trash"), which I'd like to remove. So it would be is much easy to include single "trash" directory to the plugin process, than enum every created file in exclude option.

DeprecationWarning in the latest version.

I'm using version 1.0.5 of del-webpack-plugin, during build I receive this warning:

(node:64392) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at DelWebpackPlugin.apply (/Users/kyuri/project/node_modules/del-webpack-plugin/dist/index.js:33:16)
    at webpack (/Users/kyuri/project/node_modules/webpack/lib/webpack.js:37:12)
    at options.map.options (/Users/kyuri/project/node_modules/webpack/lib/webpack.js:28:55)
    at Array.map (<anonymous>)
    at webpack (/Users/kyuri/project/node_modules/webpack/lib/webpack.js:28:40)
    at Object.<anonymous> (/Users/kyuri/project/config/frontend/start.js:18:19)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)

Tapable.plugin is deprecated.

Got this error with webpack 4.

(node:26967) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead

I would create a pull request but I really don't know how to fix this.

Directories with new files not excluded automatically

Hello.
Plugin by default removes all directories inside /build dir, because they're not listed in "added files" but matched by '**' includes.

For example, at start i have clean /build dir.
My webpack created sprites in /build/sprites/1.png dir.
And then plugin removes /build/sprites dir with my newly creates sprite.

Thus, it's needed to automatically exclude not only files, but also directories which has files which was created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.