magic-comments-loader
Advanced tools
Comparing version 2.1.0 to 2.1.1
{ | ||
"name": "magic-comments-loader", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Add webpack magic comments to your dynamic imports at build time.", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -87,6 +87,10 @@ # [`magic-comments-loader`](https://www.npmjs.com/package/magic-comments-loader) 🪄 | ||
_Note, this option is only applied when `mode` is `parser`._ | ||
_Note, this option only considers block comments that precede the dynamic imports specifier, and any comments coming after are ignored and left intact._ | ||
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`. | ||
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. | ||
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. | ||
## Examples | ||
@@ -93,0 +97,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25963
326