magic-comments-loader 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -84,9 +84,13 @@ Sets how globs are matched, either the module file path, or the `import()` speci
84
84
  ```
85
85
  **default** `'ignore'`
86
86
 
87
+ _Note, this option is only applied when `mode` is `parser`._
88
+
87
89
  _Note, this option only considers block comments that precede the dynamic imports specifier, and any comments coming after are ignored and left intact._
88
90
 
89
- Sets how dynamic imports with block comments are handled. If `ignore` is used, then it will be skipped and no magic comments from your configuration will be applied. If `replace` is used, then all found comments will be replaced with the magic comments. `append` and `prepend` add the magic comments before, or after the found comments, respectively. If a function is used it will be passed the found comments, and the magic comment string that is to be applied. The return value has the same effect as `replace`.
91
+ Sets how dynamic imports with block comments are handled. If `ignore` is used, then it will be skipped and no magic comments from your configuration will be applied. If `replace` is used, then all found comments will be replaced with the magic comments. `append` and `prepend` add the magic comments after, or before the found comments, respectively.
92
+
93
+ When a function is used it will be passed the found comments, and the magic comment string that is to be applied. The return value has the same effect as `replace`. There is an [example of using a function](https://github.com/morganney/magic-comments-loader/blob/main/__tests__/loader.spec.js#L1137-L1154) in the loader specification.
90
94
 
91
95
  ## Examples
92
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-comments-loader",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Add webpack magic comments to your dynamic imports at build time.",
5
5
  "main": "dist",
6
6
  "type": "module",