{"id":19668783,"url":"https://github.com/alxlu/suppress-chunks-webpack-plugin","last_synced_at":"2025-04-29T00:30:41.761Z","repository":{"id":13995918,"uuid":"75604155","full_name":"alxlu/suppress-chunks-webpack-plugin","owner":"alxlu","description":"plugin to suppress webpack chunks","archived":false,"fork":false,"pushed_at":"2022-12-03T15:40:58.000Z","size":646,"stargazers_count":6,"open_issues_count":15,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-17T03:53:18.084Z","etag":null,"topics":["chunk","suppress-webpack-chunks","webpack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alxlu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-05T08:26:03.000Z","updated_at":"2021-06-25T20:12:58.000Z","dependencies_parsed_at":"2023-01-13T20:00:07.380Z","dependency_job_id":null,"html_url":"https://github.com/alxlu/suppress-chunks-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxlu%2Fsuppress-chunks-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxlu%2Fsuppress-chunks-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxlu%2Fsuppress-chunks-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alxlu%2Fsuppress-chunks-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alxlu","download_url":"https://codeload.github.com/alxlu/suppress-chunks-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069554,"owners_count":17250454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chunk","suppress-webpack-chunks","webpack"],"created_at":"2024-11-11T16:37:40.095Z","updated_at":"2024-11-11T16:37:41.571Z","avatar_url":"https://github.com/alxlu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# suppress chunks webpack plugin\n[![Build Status](https://travis-ci.org/alxlu/suppress-chunks-webpack-plugin.svg?branch=master)](https://travis-ci.org/alxlu/suppress-chunks-webpack-plugin)\n\nThis plugin is intended to suppress webpack chunks.\n\n## Install\n`npm i -D suppress-chunks-webpack-plugin`\n\n\n## Usage\n\nHere's how to suppress the chunks generated by the entry points `one` and `foo`\n\n```js\nvar SuppressChunksPlugin = require('suppress-chunks-webpack-plugin');\n\nmodule.exports = {\n  ...\n\n  entry: {\n    one: './file.js',\n    foo: './foo.js',\n    bar: './bar.js',\n    main: './index.js',\n  },\n\n  output: {\n    path: path.join(__dirname, '/dist')),\n    filename: '[name].js',\n  },\n\n  plugins: [\n    ...\n\n    new SuppressChunksPlugin(['one', 'foo']);\n  ]\n}\n\n```\n\n### Filtering out specific files\n\nIf you have a chunk that produces multiple output files e.g. if you're using something like `extract-text-webpack-plugin` to generate a `.css` file, you can filter out specific files in the chunk to suppress. Simply add an object instead of a string into the array: `{ name: string, match: regexp }`\n\n\n```js\n// one.js\nrequire('./one.css');\n```\n\nThis would suppress `one.js`, but not `one.css`\n\n```js\nvar SuppressChunksPlugin = require('suppress-chunks-webpack-plugin');\n\nmodule.exports = {\n  ...\n  \n  entry: {\n    one: './one.js',\n    foo: './foo.js',\n    bar: './bar.js',\n    main: './index.js',\n  },\n\n  output: {\n    path: path.join(__dirname, '/dist')),\n    filename: '[name].js',\n  },\n  \n  module: {\n    loaders: [{\n      ...,\n      \n      loader: ExtractTextPlugin.extract(\n        'style-loader',\n        'css-loader',\n    }],\n  },\n\n  plugins: [\n    ...\n    new ExtractTextPlugin('[name].css'),\n \n    new SuppressChunksPlugin([\n      { name: 'one', match: /\\.js$/ },\n      'foo',\n      'bar',\n    ]);\n  ]\n  ```\n  \n  \n### Filtering out specific patterns\n  \nIf you want to filter out a pattern for all of your chunks, you can pass in an options object as the second parameter:\n```js\nnew SuppressChunksPlugin([\n  'one',\n  'two',\n  'foo',\n  'bar',\n  { name: 'file', match: /\\.css$/ },\n  // entries passed in with a match field have priority over the options object.\n], { filter: /\\.js$/ });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxlu%2Fsuppress-chunks-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falxlu%2Fsuppress-chunks-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falxlu%2Fsuppress-chunks-webpack-plugin/lists"}