copy-globs-webpack-plugin
raw JSON → 0.3.0 verified Sat Apr 25 auth: no javascript abandoned
Webpack plugin (v0.3.0) to copy static files using glob patterns. Offers a simpler API than copy-webpack-plugin by accepting glob patterns directly. Stable legacy version with no active development. Suitable for basic static file copying in webpack 4 projects; newer alternatives like copy-webpack-plugin have broader support and active maintenance.
Common errors
error Cannot find module 'copy-globs-webpack-plugin' ↓
cause Package not installed or misspelled.
fix
Run 'npm install copy-globs-webpack-plugin@0.3.0' or check package.json.
error TypeError: CopyGlobsPlugin is not a constructor ↓
cause ES6 import used instead of CommonJS require.
fix
Use 'const CopyGlobsPlugin = require("copy-globs-webpack-plugin");'.
Warnings
gotcha Plugin uses glob patterns but does not support options like ignore or dot. ↓
fix Use copy-webpack-plugin or implement custom filtering with glob streams.
gotcha No error or warning if pattern matches zero files; output directory may be empty. ↓
fix Verify patterns manually or switch to copy-webpack-plugin with error handling.
deprecated Package has not been updated since 2017 and is considered abandoned. ↓
fix Migrate to copy-webpack-plugin or webpack 5's built-in asset modules.
Install
npm install copy-globs-webpack-plugin yarn add copy-globs-webpack-plugin pnpm add copy-globs-webpack-plugin Imports
- CopyGlobsPlugin wrong
import CopyGlobsPlugin from 'copy-globs-webpack-plugin';correctconst CopyGlobsPlugin = require('copy-globs-webpack-plugin'); - default
const CopyGlobsPlugin = require('copy-globs-webpack-plugin'); - type wrong
const { CopyGlobsPlugin } = require('copy-globs-webpack-plugin');correctconst CopyGlobsPlugin = require('copy-globs-webpack-plugin');
Quickstart
const CopyGlobsPlugin = require('copy-globs-webpack-plugin');
module.exports = {
plugins: [
new CopyGlobsPlugin({
patterns: ['src/static/**/*', 'public/*.ico'],
output: 'dist/'
})
]
};