We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To ignore the folder or the file specifies in the options.
It copies everything, even the ignore array path.
new CopyWebpackPlugin([ { from: 'src/assets', to: 'assets', ignore: ['./src/assets/img/favicons/fav.png'] }, ]),
I also tried to ignore the folder like that.
new CopyWebpackPlugin([ { from: 'src/assets', to: 'assets', ignore: ['./src/assets/img/favicons/*'] }, ]),
Here is my full webpack.config.js
module.exports = { entry: { page1: './src/page1/main.js', page2: './src/page2/main.js', }, output: { path: path.resolve(__dirname, 'dist'), // output directory filename: '[name].js', // name of the generated bundle publicPath: '/' }, module: { rules: [ // Babel { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } }, // HTML loader { test: /\.html$/, use: [ { loader: "html-loader", options: { minimize: true } } ] }, // SCSS & CSS { test: /\.s?[ac]ss$/, use: [ { loader: MiniCssExtractPlugin.loader, }, { loader: 'css-loader' }, { // Loader for webpack to process CSS with PostCSS loader: 'postcss-loader', options: { plugins: function () { return [ require('autoprefixer') ]; } } }, { loader: 'sass-loader' } ], }, // File loader { test: /\.(woff(2)?|ttf|eot|png|svg)(\?v=\d+\.\d+\.\d+)?$/, use: [ { loader: 'file-loader', options: { limit: 8192, outputPath: '/assets' }, } ] } ] }, plugins: [ new HtmlWebpackPlugin({ template: './src/index.html', inject: true, chunks: ['page1'], filename: 'index.html' }), new HtmlWebpackPlugin({ template: './src/page2/index.html', inject: true, chunks: ['page2'], filename: 'page2/index.html' }), new MiniCssExtractPlugin({ filename: '[name].css', chunkFilename: '[id].css', }), new FaviconsWebpackPlugin('./src/assets/img/favicons/fav.png') ] };
The text was updated successfully, but these errors were encountered:
Please provide minimum reproducible test repo, looks you have invalid ignore value
Sorry, something went wrong.
Fixed here
👍 Maybe we should documented this
Successfully merging a pull request may close this issue.
Expected Behavior
To ignore the folder or the file specifies in the options.
Actual Behavior
It copies everything, even the ignore array path.
Code
I also tried to ignore the folder like that.
How Do We Reproduce?
Here is my full webpack.config.js
The text was updated successfully, but these errors were encountered: