{"_id":"webpack-exclude-assets-plugin","_rev":"1-c62d693214c3043d9e237c04a09e11e2","name":"webpack-exclude-assets-plugin","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"webpack-exclude-assets-plugin","version":"0.1.1","description":"Plugin to exclude assets from webpack output","main":"index.js","repository":{"type":"git","url":"git@github.com:klaytonfaria/webpack-exclude-assets-plugin.git"},"keywords":["webpack","webpack 4","plugin","exclude","assets","chuncks","path","name"],"author":{"name":"Klayton Faria","email":"klayton.souza@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/klaytonfaria/webpack-exclude-assets-plugin/issues"},"scripts":{"test":"webpack --config example/webpack.config.js --mode production","release":"standard-version"},"homepage":"https://github.com/klaytonfaria/webpack-exclude-assets-plugin","devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","css-loader":"^1.0.0","mini-css-extract-plugin":"^0.4.2","standard-version":"^4.4.0","webpack":"^4.17.1","webpack-command":"^0.4.1","webpack-log":"^2.0.0"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 SoundCloud\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n","_id":"webpack-exclude-assets-plugin@0.1.1","dist":{"shasum":"b39790e13697d5b9ff28524c33e610b0a5cc9488","tarball":"https://registry.npmjs.org/webpack-exclude-assets-plugin/-/webpack-exclude-assets-plugin-0.1.1.tgz","integrity":"sha512-nbhGFnW5p8UUQiYrQT7XkDE8ZdiSOTAPif8iiZlOi7QugUwwYzVRnEdDAcs7fcylAFx3nlQ+sRylrt8xVflDoA==","fileCount":19,"unpackedSize":8102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf+LjCRA9TVsSAnZWagAAfOQQAJbIXbzEFnzMwqWaSM5G\nEJYztimSxt4WiX+1y1u1UlQa1qvNGqtV4FSpZ1RS1VtmB1Wcx/0UTF8I64nx\n9Mr1src0uu8SsKewMaUF4Zu1pAHQLSUkt321DNZVmtzNTXkFea6ZivCmKJld\nj7qwhRs//NykwjRa2TAVW7nJqS6apfvTpA4ONtG6YXv8tuWT2QaeXBWLzYGt\nIb3yUH8j+9TvNRMGf5PNnGBHOyESdMFPMaW8QfuafC+Dz+CU/6vQg1xtWa39\nZjbppsj5TORL0P2m1J0MJ9u7ffnwsmSWgnV3EpwWPLWaoaycUpBt0AEQZ8Q7\nQFUCKXd7PuN9gd9oNJCojTt9z/NsM5tdSfuwMZKzmPBe6VwJuKG0wyCh821S\nSu0k8ORZEKw9nymRLYCWrGCJ7SgNMNH7jHToHUM4DiIWOtOZJoC501mrUR4B\naKw3iPMSVbVkmGLBVtkTSIzsRbMSdn00alkUEd8v/hOSocSKn9Mn0LQsvgAO\np1PVFofGUQHRwOzrk/lgdFDge8C1tJvIt5+hZ/LXa6DyLRBlFk4XATSA8QsD\nmmVX7+RTQRJh0k+2c6LKtfCqYXpfLhpWRgK5H4kD4Wc67bLoeEVUW3H8+gMI\n31ITckOz6DMzOrVrqN6SRGG4qVeFK+rtfIafHl9lDF8gFdqgP10exCDW33rl\ntppY\r\n=N+QE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBAFAVk/lw3SCtIKhxv+0dkiN7R6g+H1K6YfNdZDoPKHAiEA9h3VeydiBHWXq/nOUoxJ+8oS/iuFZKo58sAxIUBw4+c="}]},"maintainers":[{"name":"klaytonfaria","email":"klayton.souza@gmail.com"}],"_npmUser":{"name":"klaytonfaria","email":"klayton.souza@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-exclude-assets-plugin_0.1.1_1535107810588_0.16962306545217865"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-24T10:50:10.586Z","0.1.1":"2018-08-24T10:50:10.710Z","modified":"2022-05-24T06:52:43.804Z"},"maintainers":[{"name":"klaytonfaria","email":"klayton.souza@gmail.com"}],"description":"Plugin to exclude assets from webpack output","homepage":"https://github.com/klaytonfaria/webpack-exclude-assets-plugin","keywords":["webpack","webpack 4","plugin","exclude","assets","chuncks","path","name"],"repository":{"type":"git","url":"git@github.com:klaytonfaria/webpack-exclude-assets-plugin.git"},"author":{"name":"Klayton Faria","email":"klayton.souza@gmail.com"},"bugs":{"url":"https://github.com/klaytonfaria/webpack-exclude-assets-plugin/issues"},"license":"MIT","readme":"[![NPM](https://nodei.co/npm/webpack-exclude-assets-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/webpack-exclude-assets-plugin/)\n\nWebpack plugin to exclude assets from webpack output based on a path RegExp pattern.\n\n## Why?\n\nWhen we have css, scss, sss, stylus or some style file as an entry for example, using some plugin to extract chunck as a separeted file as [`mini-css-extract-plugin`](https://github.com/webpack-contrib/mini-css-extract-plugin) or [`extract-text-webpack-plugin`](https://github.com/webpack-contrib/extract-text-webpack-plugin), Webpack give us as a output a js file with some empty functions. I think that's files does'nt matter for us, so this plugin removes it.  :)\n\n## Configuration:\n\n```js\n// webpack.config.js\nconst path = require('path');\nconst MiniCssExtractPlugin = require(\"mini-css-extract-plugin\");\nconst ExcludeAssetsPlugin = require(\"webpack-exclude-assets-plugin\");\n\nmodule.exports = {\n  entry: { ... },\n  output: {\n    path: path.join(__dirname, 'dist'),\n    filename: 'js/[name].js'\n  },\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: \"[name].css\"\n    }),\n    new ExcludeAssetsPlugin({\n      // path: string | [string]\n      path: [\n        '^js\\/css\\/.*\\.js$',\n        '^.*(?=!(foo)).+some[cool]RegExpHere$'\n      ]\n    })\n  ],\n  module: { ... },\n  resolve: { ... }\n};\n```\n\n## Example:\n\n```js\n// webpack.config.js\nconst path = require('path');\nconst MiniCssExtractPlugin = require(\"mini-css-extract-plugin\");\nconst ExcludeAssetsPlugin = require(\"webpack-exclude-assets-plugin\");\n\nmodule.exports = {\n  entry: {\n    app: path.resolve(__dirname, 'js/app.js'),\n    \"css/app\": path.resolve(__dirname, 'css/app.css')\n  },\n  output: {\n    path: path.join(__dirname, 'dist'),\n    filename: 'js/[name].js'\n  },\n  plugins: [\n    new MiniCssExtractPlugin({\n      filename: \"[name].css\"\n    }),\n    new ExcludeAssetsPlugin({\n      path: ['^js\\/css\\/.*\\.js$']\n    })\n  ],\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        exclude: /node_modules/,\n        use: [\n          MiniCssExtractPlugin.loader,\n          'css-loader',\n        ]\n      }\n    ]\n  },\n  resolve: {\n    extensions: ['.css']\n  }\n};\n```\n### Output three **before** using `webpack-exclude-assets-plugin`:\n```\n.\n├── css\n│   └── app.css\n└── js\n    ├── app.js\n    └── css\n        └── app.js\n\n3 directories, 3 files\n\n```\n### Output file three **after** using `webpack-exclude-assets-plugin`:\n```\n.\n├── css\n│   └── app.css\n└── js\n    └── app.js\n\n2 directories, 2 files\n\n```\n\n## License\n\n#### [MIT](./LICENSE)\n","readmeFilename":"README.md"}