Title: enable disable webpack cache in loaders · Issue #303 · unjs/unplugin · GitHub
Open Graph Title: enable disable webpack cache in loaders · Issue #303 · unjs/unplugin
X Title: enable disable webpack cache in loaders · Issue #303 · unjs/unplugin
Description: Describe the feature Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue? can we just do this in tramsform(same to load): export default async function ...
Open Graph Description: Describe the feature Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue? can we just do this in tramsform(same ...
X Description: Describe the feature Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue? can we just do this in tramsform(s...
Opengraph URL: https://github.com/unjs/unplugin/issues/303
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"enable disable webpack cache in loaders","articleBody":"### Describe the feature\r\n\r\nSome plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue?\r\n\r\ncan we just do this in `tramsform`(same to `load`):\r\n\r\n```diff\r\nexport default async function transform(this: LoaderContext\u003c{ unpluginName: string }>, source: string, map: any) {\r\n const callback = this.async()\r\n+ // add this line to disable cache in specific situations\r\n+ this.cacheable(false)\r\n let unpluginName: string\r\n ...\r\n```\r\n\r\nor just passing some options to the loader like this:\r\n\r\n```ts\r\n// transform hook\r\n if (plugin.transform) {\r\n const useLoader: RuleSetUseItem[] = [{\r\n loader: `${TRANSFORM_LOADER}?unpluginName=${encodeURIComponent(plugin.name)}&cache[type]=memory`,\r\n }]\r\n```\r\n\r\n### Additional information\r\n\r\n- [X] Would you be willing to help implement this feature?","author":{"url":"https://github.com/GrapevineLin","@type":"Person","name":"GrapevineLin"},"datePublished":"2023-05-15T12:34:22Z","url":"https://github.com/unjs/unplugin/issues/303"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a36d7cac-891d-bfd5-ffdd-0ff567ead547 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF68:2D8919:E23F1B:12F8B2C:6B0056FF |
| html-safe-nonce | c6dda1a739bf67c7b3a9b980f9b6225b2a51915563878b78f8e400aec8dcf7bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjY4OjJEODkxOTpFMjNGMUI6MTJGOEIyQzo2QjAwNTZGRiIsInZpc2l0b3JfaWQiOiIyMDYzMjQ3NDIyNTg2Mzc3OTgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7cde6d719b2243c94b6143795aa57f662863bbb26be453b9b3f89efc55e2f970 |
| hovercard-subject-tag | issue:1710008146 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/unjs/unplugin/303/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b01473aa52d41d018df02603e265789806134c245d4a7d6e268991b394762325/unjs/unplugin/issues/303 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b01473aa52d41d018df02603e265789806134c245d4a7d6e268991b394762325/unjs/unplugin/issues/303 |
| og:image:alt | Describe the feature Some plugins cannot work with Webpack 5's persistent cache and require it to be disabled. What are the potential solutions to this issue? can we just do this in tramsform(same ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GrapevineLin |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| turbo-cache-control | no-preview |
| go-import | github.com/unjs/unplugin git https://github.com/unjs/unplugin.git |
| octolytics-dimension-user_id | 80154025 |
| octolytics-dimension-user_login | unjs |
| octolytics-dimension-repository_id | 385261169 |
| octolytics-dimension-repository_nwo | unjs/unplugin |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 385261169 |
| octolytics-dimension-repository_network_root_nwo | unjs/unplugin |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width