webpack.js.org icon indicating copy to clipboard operation
webpack.js.org copied to clipboard

Repository for webpack documentation and more!

Results 194 webpack.js.org issues
Sort by recently updated
recently updated
newest added

docs: add namedmodulesplugin description (#2547)

[{"_id":"638079efbc25e83db00a5af2","body":"[![CLA assistant check](https:\/\/cla.js.foundation\/pull\/badge\/not_signed)](https:\/\/cla.js.foundation\/webpack\/webpack.js.org?pullRequest=2708) <br\/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https:\/\/cla.js.foundation\/webpack\/webpack.js.org?pullRequest=2708) before we can accept your contribution.<br\/>","issue_id":1660247497292,"origin_id":445488875,"user_origin_id":23005875,"create_time":1544302198,"update_time":1605248397,"id":1669364207993,"updated_at":"2022-11-25T08:16:47.993000Z","created_at":"2022-11-25T08:16:47.993000Z"},{"_id":"638079efbc25e83db00a5af3","body":"Hey @prondubuisi ! Nice job, we're almost set! \r\n\r\nFor this PR to work, you will need to create a page for the link you just added. I suggest you looking at where the other plugins are located and create a markdown file there with the documentation for the plugin that you just added. That will fix the issue! \r\n\r\n\r\n@montogeek ","issue_id":1660247497292,"origin_id":445538941,"user_origin_id":16735925,"create_time":1544362605,"update_time":1544362605,"id":1669364207997,"updated_at":"2022-11-25T08:16:47.996000Z","created_at":"2022-11-25T08:16:47.996000Z"},{"_id":"638079efbc25e83db00a5af4","body":"Okay. I was thinking there was zero configuration for this.\n\nOn Tue, Dec 11, 2018, 8:14 AM Even Stensberg <[email protected]\nwrote:\n\n> *@evenstensberg* requested changes on this pull request.\n>\n> I think maybe you should come up eith examples as well as how it would\n> look like using a configuration file. Good job so far! \ud83e\udd18\ud83c\udffd\n>\n> \u2014\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https:\/\/github.com\/webpack\/webpack.js.org\/pull\/2708#pullrequestreview-183534845>,\n> or mute the thread\n> <https:\/\/github.com\/notifications\/unsubscribe-auth\/AVRz-Iux3sBnWX_jJQoj19vvpGKxL2GQks5u31tcgaJpZM4ZJz-B>\n> .\n>\n","issue_id":1660247497292,"origin_id":446113488,"user_origin_id":22311928,"create_time":1544516766,"update_time":1544516766,"id":1669364208001,"updated_at":"2022-11-25T08:16:48.000000Z","created_at":"2022-11-25T08:16:48.000000Z"},{"_id":"638079f0bc25e83db00a5af5","body":"Did you try to use the plugin and see how it works before documenting it @prondubuisi ?","issue_id":1660247497292,"origin_id":446150054,"user_origin_id":10549495,"create_time":1544523836,"update_time":1544523836,"id":1669364208004,"updated_at":"2022-11-25T08:16:48.004000Z","created_at":"2022-11-25T08:16:48.004000Z"},{"_id":"638079f0bc25e83db00a5af6","body":"@prondubuisi Friendly ping","issue_id":1660247497292,"origin_id":451759332,"user_origin_id":1002461,"create_time":1546795982,"update_time":1546795982,"id":1669364208008,"updated_at":"2022-11-25T08:16:48.008000Z","created_at":"2022-11-25T08:16:48.008000Z"},{"_id":"638079f0bc25e83db00a5af7","body":"@montogeek sorry for the wait, am still on this.","issue_id":1660247497292,"origin_id":452152661,"user_origin_id":22311928,"create_time":1546914415,"update_time":1546914415,"id":1669364208011,"updated_at":"2022-11-25T08:16:48.010000Z","created_at":"2022-11-25T08:16:48.010000Z"},{"_id":"638079f0bc25e83db00a5af8","body":"@prondubuisi you will need to use the plugin and write the documentation a bit more detailed. As @EugeneHlushko says, there is some key things missing here","issue_id":1660247497292,"origin_id":474725567,"user_origin_id":16735925,"create_time":1553068826,"update_time":1553068826,"id":1669364208013,"updated_at":"2022-11-25T08:16:48.013000Z","created_at":"2022-11-25T08:16:48.013000Z"},{"_id":"638079f0bc25e83db00a5af9","body":"@prondubuisi Friendly ping","issue_id":1660247497292,"origin_id":546496109,"user_origin_id":1002461,"create_time":1572034348,"update_time":1572034348,"id":1669364208016,"updated_at":"2022-11-25T08:16:48.016000Z","created_at":"2022-11-25T08:16:48.016000Z"}] comment

This PR attempts to fix issue #2547

Plugins

__Feature to document__ From https://github.com/webpack/webpack/issues/11975 Now that Webpack 5 resolves conditional exports, it seems likely that it's going to be bundling a lot of non-ES5 code from dependencies. It seems...

Webpack does not transpile arrow functions and template strings passed to higher order functions

[{"_id":"63807e81bc25e83db00a6054","body":"Webpack does not transpile JS - Babel does. Have you tried using the Babel loader?\r\n\r\nhttps:\/\/webpack.js.org\/loaders\/babel-loader\/","issue_id":1660247497299,"origin_id":722684601,"user_origin_id":1127729,"create_time":1604615630,"update_time":1604615660,"id":1669365377540,"updated_at":"2022-11-25T08:36:17.539000Z","created_at":"2022-11-25T08:36:17.539000Z"},{"_id":"63807e81bc25e83db00a6055","body":"Answer above","issue_id":1660247497299,"origin_id":723009466,"user_origin_id":4567934,"create_time":1604659170,"update_time":1604659170,"id":1669365377543,"updated_at":"2022-11-25T08:36:17.542000Z","created_at":"2022-11-25T08:36:17.542000Z"},{"_id":"63807e81bc25e83db00a6056","body":"@chenxsan I think we need update description about `target`, we don't transpile code, only generate code code for esX compatibility","issue_id":1660247497299,"origin_id":723010120,"user_origin_id":4567934,"create_time":1604659248,"update_time":1604659248,"id":1669365377548,"updated_at":"2022-11-25T08:36:17.548000Z","created_at":"2022-11-25T08:36:17.548000Z"},{"_id":"63807e81bc25e83db00a6057","body":"> Webpack does not transpile JS - Babel does. Have you tried using the Babel loader?\r\n> \r\n> https:\/\/webpack.js.org\/loaders\/babel-loader\/\r\n\r\nI was looking at these [migration docs](https:\/\/webpack.js.org\/migrate\/5\/) for reference.\r\n\r\n> - By default, webpack will use your browserslist config to decide which code style to emit.\r\n> - Without a browserslist it would emit ES6 style. You can use target: [\"web\", \"es5\"] to change it to ES5.\r\n\r\nThis suggests webpack would transpile and based on the code I've provided, it doesn't explain why one arrow function is being transpiled to es5 and only those passed to higher order functions aren't being transpiled.\r\n\r\nI ended up using babel in this case but have other repos where webpack is able to do the job without babel and using only targets browserslist provides (hence my confusion).\r\n","issue_id":1660247497299,"origin_id":723104894,"user_origin_id":22449500,"create_time":1604672380,"update_time":1604672473,"id":1669365377551,"updated_at":"2022-11-25T08:36:17.551000Z","created_at":"2022-11-25T08:36:17.551000Z"},{"_id":"63807e81bc25e83db00a6058","body":"yep, we need improve description about this","issue_id":1660247497299,"origin_id":723106271,"user_origin_id":4567934,"create_time":1604672549,"update_time":1604672549,"id":1669365377554,"updated_at":"2022-11-25T08:36:17.553000Z","created_at":"2022-11-25T08:36:17.553000Z"},{"_id":"63807e81bc25e83db00a6059","body":"@evilebottnawi Is there any explanation as to why part of the JS provided is being transpiled to es5 syntax?","issue_id":1660247497299,"origin_id":723107728,"user_origin_id":22449500,"create_time":1604672720,"update_time":1604672748,"id":1669365377556,"updated_at":"2022-11-25T08:36:17.556000Z","created_at":"2022-11-25T08:36:17.556000Z"},{"_id":"63807e81bc25e83db00a605a","body":"Yes, we don't change your code, it is out of scope webpack, we just generate `es5` webpack runtime in your case","issue_id":1660247497299,"origin_id":723118371,"user_origin_id":4567934,"create_time":1604673976,"update_time":1604673986,"id":1669365377558,"updated_at":"2022-11-25T08:36:17.558000Z","created_at":"2022-11-25T08:36:17.558000Z"},{"_id":"63807e81bc25e83db00a605b","body":"> Yes, we don't change your code, it is out of scope webpack, we just generate `es5` webpack runtime in your case\r\n\r\nThanks for your response. Just so I understand, this is the code webpack has generated based on the JS in the original post.\r\n\r\n```\r\n!function(){\r\n const e={key1:\"value1\",key2:\"value2\",key3:\"value3\"};\r\n Object.keys(e).filter((n=>e[n])).map((n=>`${n}=${e[n]}`)).join(\"&\"),\r\n console.log(\"arrow function containing template literal \"+e.key1)\r\n}();\r\n```\r\n\r\nThe thing that led me to believe webpack was transpiling was the arrow function around the console.log has been taken out. Can you tell me why that's the case?\r\n\r\nIs webpack smart enough to realise that it's a redundant arrow function and the expression can be extracted from the arrow function to generate a smaller bundle?","issue_id":1660247497299,"origin_id":723198601,"user_origin_id":22449500,"create_time":1604683068,"update_time":1604683068,"id":1669365377561,"updated_at":"2022-11-25T08:36:17.561000Z","created_at":"2022-11-25T08:36:17.561000Z"},{"_id":"63807e81bc25e83db00a605c","body":"bundler !== transpiler, what is the problem? You need `babel-loader` to tranpile your source to es5","issue_id":1660247497299,"origin_id":723202902,"user_origin_id":4567934,"create_time":1604683584,"update_time":1604683584,"id":1669365377563,"updated_at":"2022-11-25T08:36:17.563000Z","created_at":"2022-11-25T08:36:17.563000Z"},{"_id":"63807e81bc25e83db00a605d","body":"@usmanbuilds I don't know everything about the Webpack internals, but my guess is that what is doing the above is the [Terser plugin](https:\/\/webpack.js.org\/plugins\/terser-webpack-plugin\/). It is used automatically in production builds, and is extremely good at shaving down bundle sizes as much as possible. It's very possible that it's detecting (and removing) the redundant call.","issue_id":1660247497299,"origin_id":723254670,"user_origin_id":1127729,"create_time":1604690351,"update_time":1604690484,"id":1669365377566,"updated_at":"2022-11-25T08:36:17.566000Z","created_at":"2022-11-25T08:36:17.566000Z"},{"_id":"63807e81bc25e83db00a605e","body":"We do have a warning here https:\/\/webpack.js.org\/guides\/getting-started\/#modules:\r\n\r\n> Note that webpack will not alter any code other than import and export statements. If you are using other ES2015 features, make sure to use a transpiler such as Babel or Bubl\u00e9 via webpack's loader system.\r\n\r\nBut yeah, users might pay no attention to it. Maybe we can add a similar paragraph under `Target`.","issue_id":1660247497299,"origin_id":723371388,"user_origin_id":1091472,"create_time":1604713501,"update_time":1604713501,"id":1669365377569,"updated_at":"2022-11-25T08:36:17.569000Z","created_at":"2022-11-25T08:36:17.569000Z"},{"_id":"63807e81bc25e83db00a605f","body":"If anyone's interested in helping, I think this file https:\/\/github.com\/webpack\/webpack.js.org\/blob\/master\/src\/content\/concepts\/targets.md is where we can edit. Otherwise I'll document it later.","issue_id":1660247497299,"origin_id":723371725,"user_origin_id":1091472,"create_time":1604713667,"update_time":1604713667,"id":1669365377572,"updated_at":"2022-11-25T08:36:17.572000Z","created_at":"2022-11-25T08:36:17.572000Z"},{"_id":"63807e81bc25e83db00a6060","body":"> @usmanbuilds I don't know everything about the Webpack internals, but my guess is that what is doing the above is the [Terser plugin](https:\/\/webpack.js.org\/plugins\/terser-webpack-plugin\/). It is used automatically in production builds, and is extremely good at shaving down bundle sizes as much as possible. It's very possible that it's detecting (and removing) the redundant call.\r\n\r\nThank you very much. Exactly what I was looking for.","issue_id":1660247497299,"origin_id":723981544,"user_origin_id":22449500,"create_time":1604924718,"update_time":1604924718,"id":1669365377575,"updated_at":"2022-11-25T08:36:17.575000Z","created_at":"2022-11-25T08:36:17.575000Z"}] comment

# Bug report **What is the current behavior?** Arrow functions (including those that contain template strings) are not transpiled down to ES5 _only_ when they are passed to higher order...

Document webpack change: enable named exports for commonjs as node.js supports it now

[{"_id":"6380821c70db72139b111805","body":"Yes, feel free to send PR","issue_id":1660247497302,"origin_id":723215055,"user_origin_id":4567934,"create_time":1604685110,"update_time":1604685110,"id":1669366300260,"updated_at":"2022-11-25T08:51:40.259000Z","created_at":"2022-11-25T08:51:40.259000Z"},{"_id":"6380821c70db72139b111807","body":"@evilebottnawi ok\r\n","issue_id":1660247497302,"origin_id":723215741,"user_origin_id":65657554,"create_time":1604685194,"update_time":1604685194,"id":1669366300263,"updated_at":"2022-11-25T08:51:40.263000Z","created_at":"2022-11-25T08:51:40.263000Z"}] comment

*A pull request by @sokra was merged and maintainers requested a documentation change.* See pull request: https://github.com/webpack/webpack/pull/11885 --- fixes #11878 **What kind of change does this PR introduce?** bugfix, feature...

documentation update and confusions around

[{"_id":"63807a2abc25e83db00a5bb1","body":"<!-- identifier: admin-actions -->\n\n*For maintainers only:*\n\n* [ ] webpack-4\n* [ ] webpack-5\n* [ ] bug\n* [ ] critical-bug\n* [ ] enhancement\n* [ ] documentation\n* [ ] performance\n* [ ] dependencies\n* [ ] question","issue_id":1660247497304,"origin_id":716182034,"user_origin_id":26676291,"create_time":1603646778,"update_time":1603646778,"id":1669364266504,"updated_at":"2022-11-25T08:17:46.504000Z","created_at":"2022-11-25T08:17:46.504000Z"},{"_id":"63807a2abc25e83db00a5bb2","body":"\/cc @webpack\/documentation-team need fix, it is real misleading","issue_id":1660247497304,"origin_id":716475297,"user_origin_id":4567934,"create_time":1603710187,"update_time":1603710187,"id":1669364266508,"updated_at":"2022-11-25T08:17:46.507000Z","created_at":"2022-11-25T08:17:46.507000Z"}] comment

# Bug report **What is the current behavior?** Read a documentation about webpack-5 who is really talking about webpack-5. **If the current behavior is a bug, please provide the steps...

Hi, I followed the documentation in webpack [on how to setup a web worker with workbox](https://webpack.js.org/guides/progressive-web-application/#root). But Im running into a bit of a snag. This is the error I...

There is a plugin: https://github.com/mariusbalcytis/extract-file-loader/blob/master/Plugin.js - it's not webpack-5 compatible, but we want to make it one, sadly, there is no documentation about what should be used instead of deprecated...

plugins: fix optimization.splitChunks.automaticNamePrefix

[{"_id":"63808773bc25e83db00a6a4d","body":"This pull request is being automatically deployed with Vercel ([learn more](https:\/\/vercel.link\/github-learn-more)). \nTo see the status of your deployment, click below or on the icon next to each commit.\n\n\ud83d\udd0d Inspect: [https:\/\/vercel.com\/webpack-docs\/webpack-js-org\/jw9r3e47p](https:\/\/vercel.com\/webpack-docs\/webpack-js-org\/jw9r3e47p) \n\u2705 Preview: [https:\/\/webpack-js-org-git-fix-3822.webpack-docs.vercel.app](https:\/\/webpack-js-org-git-fix-3822.webpack-docs.vercel.app)\n\n","issue_id":1660247497311,"origin_id":679176337,"user_origin_id":35613825,"create_time":1598280924,"update_time":1602318467,"id":1669367667266,"updated_at":"2022-11-25T09:14:27.265000Z","created_at":"2022-11-25T09:14:27.265000Z"},{"_id":"662bf8b66c617b7b500c30ba","body":"automaticNamePrefix has been removed in v5","issue_id":1660247497311,"origin_id":2015457711,"user_origin_id":46647141,"create_time":1711124824,"update_time":1711124824,"id":1714157750420,"updated_at":"2024-04-26T18:55:50.420000Z","created_at":"2024-04-26T18:55:50.420000Z"}] comment

Fix : https://github.com/webpack/webpack.js.org/issues/3822 - [x] Read and sign the [CLA][1]. PRs that haven't signed it won't be accepted. - [x] Make sure your PR complies with the [writer's guide][2]. -...

Plugins

Document webpack change: Move Module.used and Module.usedExports into ModuleGraph

[{"_id":"63807f874b97542c9a307b3b","body":"Couldn't find this in the docs","issue_id":1660247497313,"origin_id":705884964,"user_origin_id":2896187,"create_time":1602200562,"update_time":1602200562,"id":1669365639833,"updated_at":"2022-11-25T08:40:39.833000Z","created_at":"2022-11-25T08:40:39.833000Z"}] comment

*A pull request by @sokra was merged and maintainers requested a documentation change.* See pull request: https://github.com/webpack/webpack/pull/7852 --- **What kind of change does this PR introduce?** refactor **Did you add...

webpack5

Document webpack change: refactor chunk id plugins

[{"_id":"638080edbc25e83db00a62f9","body":"Do we need to document this change \r\n`webpack.NamedChunksPlugin -> webpack.ids.NamedChunkIdsPlugin` \r\nLooks like in v5 we recommend using `optimization.chunkIds: 'named'` instead of `NamedChunksPlugin` \r\n","issue_id":1660247497315,"origin_id":705873360,"user_origin_id":2896187,"create_time":1602199417,"update_time":1602199417,"id":1669365997716,"updated_at":"2022-11-25T08:46:37.716000Z","created_at":"2022-11-25T08:46:37.716000Z"}] comment

*A pull request by @sokra was merged and maintainers requested a documentation change.* See pull request: https://github.com/webpack/webpack/pull/7995 --- * fixed sorting of assets in stats * NamedChunkIdsPlugin can now generate...

webpack5