preload-webpack-plugin icon indicating copy to clipboard operation
preload-webpack-plugin copied to clipboard

Please use https://github.com/vuejs/preload-webpack-plugin instead.

Results 59 preload-webpack-plugin issues
Sort by recently updated
recently updated
newest added

No idea what I'm doing wrong but if I want to preload local fonts, it adds "crossorigin='anonymous'" to the link tag: `` that causes a `A preload for '' is...

tapAsync undefined in webpack4

[{"_id":"634731f7b918e158f31606d1","body":"Can you try things out with the [`v3.0.0` alpha releases](https:\/\/github.com\/GoogleChromeLabs\/preload-webpack-plugin\/releases\/tag\/v3.0.0-alpha.1) and let me know if you run into any issues there?\r\n\r\n```\r\n$ npm install --save-dev preload-webpack-plugin@next\r\n```","issue_id":1660458738668,"origin_id":384753892,"user_origin_id":1749548,"create_time":1524769073,"update_time":1524769073,"id":1665610231087,"updated_at":"2022-10-12T21:30:31.087000Z","created_at":"2022-10-12T21:30:31.087000Z"},{"_id":"634731f7b918e158f31606d2","body":"I already use version 3.0.0-alpha.3","issue_id":1660458738668,"origin_id":385830482,"user_origin_id":602508,"create_time":1525221189,"update_time":1525251019,"id":1665610231091,"updated_at":"2022-10-12T21:30:31.091000Z","created_at":"2022-10-12T21:30:31.091000Z"},{"_id":"634731f7b918e158f31606d3","body":"Which version of [html-webpack-plugin](https:\/\/github.com\/jantimon\/html-webpack-plugin) are you using \uff1f","issue_id":1660458738668,"origin_id":385838283,"user_origin_id":2577157,"create_time":1525224512,"update_time":1525224512,"id":1665610231095,"updated_at":"2022-10-12T21:30:31.095000Z","created_at":"2022-10-12T21:30:31.095000Z"},{"_id":"634731f7b918e158f31606d4","body":"3.2.0, wrote on top","issue_id":1660458738668,"origin_id":385896625,"user_origin_id":602508,"create_time":1525248221,"update_time":1525248221,"id":1665610231098,"updated_at":"2022-10-12T21:30:31.098000Z","created_at":"2022-10-12T21:30:31.098000Z"},{"_id":"634731f7b918e158f31606d5","body":"Sorry for my mistake. I take a test on webpack v4.2.0 and html-webpack-plugin v3.2.0\r\n\r\nIt works well here.\r\n\r\nI guess you may use preload-webpack-plugin before html-webpack-plugin. If you do that, the `htmlWebpackPluginBeforeHtmlProcessing` may missed because it has not been registered.\r\n\r\nCan you make a check for this ? If not, can you provide us your webpack config ?","issue_id":1660458738668,"origin_id":385961218,"user_origin_id":2577157,"create_time":1525264175,"update_time":1525264175,"id":1665610231101,"updated_at":"2022-10-12T21:30:31.100000Z","created_at":"2022-10-12T21:30:31.100000Z"},{"_id":"634731f7b918e158f31606d6","body":"Thank you! With preload plugin after html-webpack-plugin it works good!","issue_id":1660458738668,"origin_id":386089011,"user_origin_id":602508,"create_time":1525288426,"update_time":1525288426,"id":1665610231103,"updated_at":"2022-10-12T21:30:31.103000Z","created_at":"2022-10-12T21:30:31.103000Z"},{"_id":"634731f7b918e158f31606d8","body":"@toxic-johann, \r\n I am having the same issue, what do you mean by using preload-webpack-plugin before html-webpack-plugin? how can I change the order of plugin to build? \r\nThank you\r\n","issue_id":1660458738668,"origin_id":396810373,"user_origin_id":935264,"create_time":1528864406,"update_time":1528864406,"id":1665610231108,"updated_at":"2022-10-12T21:30:31.107000Z","created_at":"2022-10-12T21:30:31.107000Z"},{"_id":"634731f7b918e158f31606d9","body":"@mejiciel In the webpack plugins array. You should put `html-webpack-plugin` before `preload-webpack-plugin`.","issue_id":1660458738668,"origin_id":396815309,"user_origin_id":2577157,"create_time":1528866649,"update_time":1528866649,"id":1665610231111,"updated_at":"2022-10-12T21:30:31.110000Z","created_at":"2022-10-12T21:30:31.110000Z"},{"_id":"634731f7b918e158f31606da","body":"FWIW, The v3 branch has a new check for this, and will display in a meaningful error message when this happens: https:\/\/github.com\/GoogleChromeLabs\/preload-webpack-plugin\/commit\/89f6495dcd0f4a17db85566ebd3357f4375a6bce#diff-1fdf421c05c1140f6d71444ea2b27638R123","issue_id":1660458738668,"origin_id":396977257,"user_origin_id":1749548,"create_time":1528903293,"update_time":1528903293,"id":1665610231113,"updated_at":"2022-10-12T21:30:31.113000Z","created_at":"2022-10-12T21:30:31.113000Z"},{"_id":"634731f7b918e158f31606db","body":"This issue should remain opened until Webpack 4 support is released, just for better visibility.","issue_id":1660458738668,"origin_id":408642193,"user_origin_id":11700385,"create_time":1532821942,"update_time":1532821942,"id":1665610231120,"updated_at":"2022-10-12T21:30:31.119000Z","created_at":"2022-10-12T21:30:31.119000Z"},{"_id":"634731f7b918e158f31606dd","body":"in which file should I put html-webpack-plugin before preload-webpack-plugin ?","issue_id":1660458738668,"origin_id":418020620,"user_origin_id":5850485,"create_time":1535958379,"update_time":1535958379,"id":1665610231127,"updated_at":"2022-10-12T21:30:31.127000Z","created_at":"2022-10-12T21:30:31.127000Z"},{"_id":"634731f7b918e158f31606de","body":"I am having same issue. using -\t\"base-href-webpack-plugin\": \"^2.0.0\", \t\"html-webpack-plugin\": \"4.0.0-alpha.1\",\r\n\r\n","issue_id":1660458738668,"origin_id":418582403,"user_origin_id":5430629,"create_time":1536115769,"update_time":1536115769,"id":1665610231137,"updated_at":"2022-10-12T21:30:31.136000Z","created_at":"2022-10-12T21:30:31.136000Z"},{"_id":"634731f7b918e158f31606e0","body":"I'm using webpack 4.42.1 and I had the same issue, using \"base-href-webpack-plugin\": \"^2.0.0\", \"html-webpack-plugin\": \"4.0.1\".\r\nBut I fixed it installing \"html-webpack-plugin\": \"^3.2.0\", and \"base-href-webpack-plugin\": \"^2.0.0\".\r\n","issue_id":1660458738668,"origin_id":604118643,"user_origin_id":17678430,"create_time":1585174976,"update_time":1585174976,"id":1665610231143,"updated_at":"2022-10-12T21:30:31.143000Z","created_at":"2022-10-12T21:30:31.143000Z"}] comment

Building with PreloadWebpackPlugin enabled causes following error: ``` /home/alex/GIT/proj/node_modules/preload-webpack-plugin/build/index.js:163 compilation.hooks.htmlWebpackPluginBeforeHtmlProcessing.tapAsync(_this2.constructor.name, function (htmlPluginData, callback) { ^ TypeError: Cannot read property 'tapAsync' of undefined at /home/alex/GIT/proj/node_modules/preload-webpack-plugin/build/index.js:163:67 ``` Project package versions: [email protected] [email protected]

Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1. Commits 9a2e9b6 Mark version 6.4.1 90a9548 More rigorously check surrogate pairs in regexp validator df0cf1a Mark version 6.4.0 5303412 Also export Parser via Parser.acorn...

dependencies

Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1. Commits 9a2e9b6 Mark version 6.4.1 90a9548 More rigorously check surrogate pairs in regexp validator df0cf1a Mark version 6.4.0 5303412 Also export Parser via Parser.acorn...

dependencies

How to preload js file in multiple html page?

[{"_id":"63473612b918e158f316096f","body":"@happylindz , did you tried something like this -\r\n\r\nnew preloadWebpackPlugin({\r\n rel: 'preload',\r\n include: ['runtime', 'polyfills'] \/\/common ones \r\n }),\r\n new preloadWebpackPlugin({\r\n rel: 'preload',\r\n include: ['blah-styles'], \/\/ including specific chunks for specific page\r\n excludeHtmlNames: ['..\/index-blah.html', '..\/index-blahblah.html'] \/\/ignore for these files\r\n })","issue_id":1660458738676,"origin_id":505775009,"user_origin_id":25239874,"create_time":1561537618,"update_time":1561537630,"id":1665611282550,"updated_at":"2022-10-12T21:48:02.550000Z","created_at":"2022-10-12T21:48:02.550000Z"},{"_id":"63473612b918e158f3160970","body":"@vs28031996 No, I didn't try it. I think it is a solution to solve the problem but a little trouble.","issue_id":1660458738676,"origin_id":505783260,"user_origin_id":10935962,"create_time":1561538999,"update_time":1561538999,"id":1665611282561,"updated_at":"2022-10-12T21:48:02.560000Z","created_at":"2022-10-12T21:48:02.560000Z"},{"_id":"63473612b918e158f3160971","body":"I have the same issue, I believe we have to wait for https:\/\/github.com\/GoogleChromeLabs\/preload-webpack-plugin\/pull\/109","issue_id":1660458738676,"origin_id":588193382,"user_origin_id":3576913,"create_time":1582114351,"update_time":1582114373,"id":1665611282570,"updated_at":"2022-10-12T21:48:02.570000Z","created_at":"2022-10-12T21:48:02.570000Z"}] comment

Thanks to provide the nice plugin, but I got a problem: In my project, I have multiple entry(many pages) and some common chunks. How could I do to let each...

add target option

[{"_id":"6347406509a35269b78245fc","body":"\nThanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).\n\n:memo: **Please visit <https:\/\/cla.developers.google.com\/> to sign.**\n\nOnce you've signed (or fixed any issues), please reply here with `@googlebot I signed it!` and we'll verify it.\n\n----\n\n#### What to do if you already signed the CLA\n\n##### Individual signers\n\n* It's possible we don't have your GitHub username or you're using a different email address on your commit. Check [your existing CLA data](https:\/\/cla.developers.google.com\/clas) and verify that your [email is set on your git commits](https:\/\/help.github.com\/articles\/setting-your-email-in-git\/).\n\n##### Corporate signers\n\n* Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to [go\/cla#troubleshoot](http:\/\/go\/cla#troubleshoot) ([Public version](https:\/\/opensource.google\/docs\/cla\/#troubleshoot)).\n* The email used to register you as an authorized contributor must be the email used for the Git commit. Check [your existing CLA data](https:\/\/cla.developers.google.com\/clas) and verify that your [email is set on your git commits](https:\/\/help.github.com\/articles\/setting-your-email-in-git\/).\n* The email used to register you as an authorized contributor must also be [attached to your GitHub account](https:\/\/github.com\/settings\/emails).\n\t\t\n\n\u2139\ufe0f **Googlers: [Go here](https:\/\/goto.google.com\/prinfo\/https%3A%2F%2Fgithub.com%2FGoogleChromeLabs%2Fpreload-webpack-plugin%2Fpull%2F110) for more info**.\n\n<!-- need_sender_cla -->","issue_id":1660458738679,"origin_id":579926773,"user_origin_id":5384588,"create_time":1580326995,"update_time":1580326995,"id":1665613925570,"updated_at":"2022-10-12T22:32:05.570000Z","created_at":"2022-10-12T22:32:05.570000Z"}] comment

The idea here is to support appending to ``. There are cases in which it's not desirable to pollute the ``. This addresses (mostly at least 😄 ) https://github.com/GoogleChromeLabs/preload-webpack-plugin/issues/85 ....

Add links based on webpackPreload/webpackPrefetch magic comments

[{"_id":"63473eec6a9f94608c5a02fe","body":"Put together a quick PR https:\/\/github.com\/GoogleChromeLabs\/preload-webpack-plugin\/pull\/109, would be great to get some initial thoughts!","issue_id":1660458738682,"origin_id":576542559,"user_origin_id":764083,"create_time":1579589438,"update_time":1579589438,"id":1665613548699,"updated_at":"2022-10-12T22:25:48.699000Z","created_at":"2022-10-12T22:25:48.699000Z"}] comment

As of 4.6.0 webpack will generate links based on webpackPreload/webpackPrefetch magic comments. However where we are attempting to preload/prefetch chunks from an entrypoint loading will not start until the parent...

Fixes #108 ## Description - Adds link tags for entrypoints as well as any chunks which are prefetched or preloaded from an entrypoint via a magic comment ## Why -...

Added closingTagRequired as Option and passing it to createHTMLElementString. Necessary for Razor Pages where closing tags are obligatory.

Feature to opt-in to CORS preload requests

[{"_id":"63472e4eb918e158f316041f","body":"Not every CDN supports [CORS](https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/CORS), so it would introduce compatibility issues with those CDNs if the `crossorigin` attribute were added unconditionally for every cross-origin URL.\r\n\r\nNeither JavaScript nor CSS resources [_require_ CORS](https:\/\/web.dev\/same-origin-policy\/#what-is-permitted-and-what-is-blocked) to be enabled for basic functionality (there are some restrictions on non-CORS JavaScript, but they're usually not deal-breakers).\r\n\r\nAdditionally, there needs to be a match between whether or not a CORS was used for the preload request and whether the `crossorigin` attribute is set on the `<script>` or `<link rel=\"stylesheet\">` when it's added to the DOM. If a preload takes place with CORS, but the resulting script or stylesheet usage doesn't specify `crossorigin`, then the preloaded response won't be used\u2014and vice-versa.\r\n\r\nSo what it sounds like is that you're trying to preload some CSS or JS from a CDN and then when you actually use those resources in your page, you're specifying that they should be `crossorigin`.\r\n\r\nAdding in a new config option to let you specifically opt-in to CORS preloading is possible, if there's significant demand, but it might be easier if you just removed the `crossorigin` attribute from your actual usage of the CSS or JS (unless it's *actually* needed for some reason).\r\n\r\nHow does that sound?","issue_id":1660458738692,"origin_id":530464487,"user_origin_id":1749548,"create_time":1568220189,"update_time":1568220189,"id":1665609294166,"updated_at":"2022-10-12T21:14:54.166000Z","created_at":"2022-10-12T21:14:54.166000Z"},{"_id":"63472e4eb918e158f3160420","body":"Sometimes we have to add `crossorigin` attribute to `script` tag, because if not, APM like elastic-apm-rum-js will only get `Script Error` instead of detailed error message when script is hosted on CDN.","issue_id":1660458738692,"origin_id":555815068,"user_origin_id":25565814,"create_time":1574218933,"update_time":1574219015,"id":1665609294170,"updated_at":"2022-10-12T21:14:54.170000Z","created_at":"2022-10-12T21:14:54.170000Z"}] comment

js && css use CDN, and host is different with website host。 so i need set the crossorigin. if not these config preload js && css resources will be load...