diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3ce9cf3..f92d3cb 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,16 +1,15 @@ diff --git a/.github/ISSUE_TEMPLATE/BUG.md b/.github/ISSUE_TEMPLATE/BUG.md index c5547b6..931d2e2 100644 --- a/.github/ISSUE_TEMPLATE/BUG.md +++ b/.github/ISSUE_TEMPLATE/BUG.md @@ -3,32 +3,31 @@ name: 🐛 Bug Report about: Something went awry and you'd like to tell us about it. --- - - + + ### Bug report - + - + ### Actual Behavior - + ### Expected Behavior - - + + ### How Do We Reproduce? - - - - - - + + + + + -### Please paste the results of `npx webpack-cli info` here, and mention other relevant information +### Please paste the results of `npx webpack-cli info` here, and mention other relevant information. diff --git a/.github/ISSUE_TEMPLATE/DOCS.md b/.github/ISSUE_TEMPLATE/DOCS.md index a94c0c9..1f9fad7 100644 --- a/.github/ISSUE_TEMPLATE/DOCS.md +++ b/.github/ISSUE_TEMPLATE/DOCS.md @@ -3,12 +3,12 @@ name: 📚 Documentation about: Are the docs lacking or missing something? Do they need some new 🔥 hotness? Tell us here. --- - - + + -Documentation Is: +Documentation is: - + - [ ] Missing - [ ] Needed @@ -17,9 +17,9 @@ Documentation Is: ### Please Explain in Detail... - + - + ### Your Proposal for Changes diff --git a/.github/ISSUE_TEMPLATE/FEATURE.md b/.github/ISSUE_TEMPLATE/FEATURE.md index 1e5304e..d1e618f 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE.md +++ b/.github/ISSUE_TEMPLATE/FEATURE.md @@ -3,16 +3,18 @@ name: ✨ Feature Request about: Suggest an idea for this project --- - - + + ### Feature Proposal - + - + ### Feature Use Case -### Please paste the results of `npx webpack-cli info` here, and mention other relevant information + + +### Please paste the results of `npx webpack-cli info` here, and mention other relevant information. diff --git a/.github/ISSUE_TEMPLATE/MODIFICATION.md b/.github/ISSUE_TEMPLATE/MODIFICATION.md index c60a501..3560244 100644 --- a/.github/ISSUE_TEMPLATE/MODIFICATION.md +++ b/.github/ISSUE_TEMPLATE/MODIFICATION.md @@ -1,20 +1,25 @@ --- name: 🔧 Modification Request -about: Would you like something work differently? Have an alternative approach? This is the template for you. +about: Want something to work differently? Have an alternative approach? This is the template for you. --- - - + + ### Modification Proposal - + + - + ### Expected Behavior / Situation + + ### Actual Behavior / Situation -### Please paste the results of `npx webpack-cli info` here, and mention other relevant information + + +### Please paste the results of `npx webpack-cli info` here, and mention other relevant information. diff --git a/.github/ISSUE_TEMPLATE/SUPPORT.md b/.github/ISSUE_TEMPLATE/SUPPORT.md index daaf912..066348a 100644 --- a/.github/ISSUE_TEMPLATE/SUPPORT.md +++ b/.github/ISSUE_TEMPLATE/SUPPORT.md @@ -1,7 +1,15 @@ --- name: 🆘 Support, Help, and Advice -about: 👉🏽 Need support, help, or advice? Don't open an issue! Head to https://github.com/webpack/webpack/discussions or StackOverflow. +about: 👉🏽 Need support, help, or advice? Don't open an issue - visit "GitHub Discussions" or "Stack Overflow" instead. --- -Hey there! If you need support, help, or advice then this is not the place to ask. -Please visit [GitHub Discussions](https://github.com/webpack/webpack/discussions) or [StackOverflow](https://stackoverflow.com/questions/tagged/webpack) instead. +Hey there! 👋 + +If you need support, help, or advice then this is not the right place to ask. + +Please visit one of the following instead: + +- [GitHub Discussions](https://github.com/webpack/webpack/discussions) +- [Stack Overflow](https://stackoverflow.com/questions/tagged/webpack) + +Thanks for understanding! diff --git a/README.md b/README.md index 1d36788..4bf8d22 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ Then you can use the `expose-loader` using two approaches. ## Inline The `|` or `%20` (space) allow to separate the `globalName`, `moduleLocalName` and `override` of expose. + The documentation and syntax examples can be read [here](#syntax). > [!WARNING] @@ -115,7 +116,9 @@ module.exports = { ``` The [`require.resolve`](https://nodejs.org/api/modules.html#modules_require_resolve_request_options) call is a Node.js function (unrelated to `require.resolve` in webpack processing). + `require.resolve` that returns the absolute path of the module (`"/.../app/node_modules/jquery/dist/jquery.js"`). + So the expose only applies to the `jquery` module and it's only exposed when used in the bundle. Finally, run `webpack` using the method you normally use (e.g., via CLI or an npm script). @@ -263,6 +266,7 @@ type moduleLocalName = string; Default: `undefined` The name of method/variable etc of the module (the module must export it). + If `moduleLocalName` is specified, it exposes only the value of `moduleLocalName`. **src/index.js** @@ -304,7 +308,9 @@ type override = boolean; Default: `false` By default, loader does not override the existing value in the global object, because it is unsafe. + In `development` mode, we throw an error if the value already present in the global object. + But you can configure loader to override the existing value in the global object using this option. To force override the value that is already present in the global object you can set the `override` option to the `true` value. @@ -461,6 +467,7 @@ module.exports = { ## Contributing We welcome all contributions! + If you're new here, please take a moment to review our contributing guidelines before submitting issues or pull requests. [CONTRIBUTING](./.github/CONTRIBUTING.md)