2.5.26 • Published 21 days ago
@dumlj/seed-webpack-plugin v2.5.26
Seed Webpack Plugin
Basic webpack plugins
BACKGROUND
There is a lot of duplication in the development of Webpack plugins, so all '@dumlj/*-webpack-plugin's can inherit this basic plugin to make development more convenient.
FEATURE
- Check for updates uniformly. Update prompts will only come from one checker, and only dependencies declared in
package.json
will be prompted (in nested plug-ins, undeclared dependencies will be ignored). - Provide some more general methods.
INSTALL
# use npm
$ npm install --dev @dumlj/seed-webpack-plugin
# use yarn
$ yarn add --dev @dumlj/seed-webpack-plugin
# use pnpm
$ pnpm add @dumlj/seed-webpack-plugin -D
USAGE
import { SeedWebpackPlugin, type SeedWebpackPluginOptions } from '@dumlj/seed-webpack-plugin'
import type { Compiler } from 'webpack'
export interface CustomWebpackPluginOptions extends SeedWebpackPluginOptions {
unnecessary: string
}
export class CustomWebpackPlugin extends SeedWebpackPlugin {
static PLUGIN_NAME = 'custom-webpack-plugin'
protected unnecessary: string
constructor(options?: CustomWebpackPluginOptions) {
super(options)
const { unnecessary } = options || {}
this.unnecessary = unnecessary
}
public apply(compiler: Compiler) {
super.apply(compiler)
if (this.isSkipIncomplete('skip operation when necessary options are missed.', { unnecessary: this.unnecessary })) {
return
}
compiler.hooks.thisCompilation.tap(this.pluginName, () => {
this.logger.info('todo something...')
})
}
}
LIVE DEMO
INTERNAL DEPENDENCIES
2.5.27-alpha.1713365667.0
21 days ago
2.5.26-alpha.1710126501.0
2 months ago
2.5.26
2 months ago
2.5.26-alpha.1709143224.0
2 months ago
2.5.26-alpha.1709136968.0
2 months ago
2.5.25-alpha.1709135426.0
2 months ago
2.5.25
3 months ago
2.5.23
3 months ago
2.5.24
3 months ago
2.5.23-alpha.1707383866.0
3 months ago
2.5.23-alpha.1707390213.0
3 months ago
2.5.23-alpha.1707401616.0
3 months ago
2.5.23-alpha.1707244387.0
3 months ago
2.5.23-alpha.1707282212.0
3 months ago
2.5.23-alpha.1707248747.0
3 months ago
2.5.23-alpha.1707245597.0
3 months ago
2.5.23-alpha.1707287569.0
3 months ago
2.5.23-alpha.1707212485.0
3 months ago
2.5.22
4 months ago
2.5.21
4 months ago
2.5.20
5 months ago
2.5.19
5 months ago
2.5.18
5 months ago