diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 032060af..89556117 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -10,19 +10,12 @@ the [Babel Slack](babeljs.slack.com). Future support requests will be closed.
**I'm submitting a feature request**
**I'm submitting a support request** => Please do not submit support request here, see note at the top of this template.
-
-**Webpack Version:**
-1.10.x/2.x
-
-**Babel Core Version**:
-6.x
-
-**Babel Loader Version**:
-5.4.x/6.2.x
-
-
**Please tell us about your environment:**
-OSX 10.x / Linux / Windows 10
+Webpack Version: 4.x/5.x
+Babel Core Version: 7.x
+Babel Loader Version: 8.x/9.x
+
+Tip: you can also run `npx envinfo --preset babel` and just paste the result here
**Current behavior:**
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 14fc1bc7..807ab25d 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -10,6 +10,7 @@
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
+- [ ] Docs update
- [ ] Build related changes
- [ ] CI related changes
- [ ] Other... Please describe:
diff --git a/README.md b/README.md
index ca624447..76abe55f 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-
+
@@ -46,8 +46,9 @@ module: {
use: {
loader: 'babel-loader',
options: {
+ targets: "defaults",
presets: [
- ['@babel/preset-env', { targets: "defaults" }]
+ ['@babel/preset-env']
]
}
}
@@ -71,10 +72,11 @@ module: {
use: {
loader: 'babel-loader',
options: {
+ targets: "defaults",
presets: [
- ['@babel/preset-env', { targets: "defaults" }]
+ ['@babel/preset-env']
],
- plugins: ['@babel/plugin-proposal-class-properties']
+ plugins: ['@babel/plugin-proposal-decorators', { version: "2023-11" }]
}
}
}
@@ -94,7 +96,7 @@ This loader also supports the following loader-specific option:
* `customize`: Default `null`. The path of a module that exports a `custom` callback [like the one that you'd pass to `.custom()`](#customized-loader). Since you already have to make a new file to use this, it is recommended that you instead use `.custom` to create a wrapper loader. Only use this if you _must_ continue using `babel-loader` directly, but still want to customize.
-* `metadataSubscribers`: Default `[]`. Takes an array of context function names. E.g. if you passed ['myMetadataPlugin'], you'd assign a subscriber function to `context.myMetadataPlugin` within your webpack plugin's hooks & that function will be called with `metadata`.
+* `metadataSubscribers`: Default `[]`. Takes an array of context function names. E.g. if you passed ['myMetadataPlugin'], you'd assign a subscriber function to `context.myMetadataPlugin` within your webpack plugin's hooks & that function will be called with `metadata`. See [`./test/metadata.test.js`](./test/metadata.test.js) for an example.
## Troubleshooting
@@ -301,10 +303,6 @@ For example, to change the environment targets passed to `@babel/preset-env` bas
module.exports = api => {
return {
- plugins: [
- "@babel/plugin-proposal-nullish-coalescing-operator",
- "@babel/plugin-proposal-optional-chaining"
- ],
presets: [
[
"@babel/preset-env",