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.
- package/README.md +5 -1
- 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
|
|
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
|
|