How to use the clean-webpack-plugin.default function in clean-webpack-plugin

To help you get started, we’ve selected a few clean-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pd4d10 / tampery / webpack.config.js View on Github external
const path = require('path')
const webpack = require('webpack')
const CleanWebpackPlugin = require('clean-webpack-plugin').default
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')

/** @type {webpack.Configuration} */
const config = {
  mode: 'development',
  watch: true,
  devtool: 'source-map',
  entry: {
    background: './src/background',
    popup: './src/popup',
    dashboard: './src/dashboard',
  },
  output: {
    path: path.resolve('chrome/dist'),
    filename: '[name].js',
github SchoofsKelvin / vscode-sshfs / webpack.config.js View on Github external
//@ts-check
'use strict';

const { join, resolve, dirname } = require('path');
const fs = require('fs');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin').default;

/**
 * @template T
 * @param { (cb: (e?: Error, r?: T) => void) => any } func
 * @return { Promise }
 */
function wrap(func) {
    return new Promise((res, rej) => {
        try {
            func((e, r) => e ? rej(e) : res(r));
        } catch (e) {
            rej(e);
        }
    });
}

clean-webpack-plugin

A webpack plugin to remove/clean your build folder(s).

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis