magic-comments-loader
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "magic-comments-loader", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Add webpack magic comments to your dynamic imports during build time", | ||
@@ -45,3 +45,3 @@ "main": "index.js", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^27.1.0", | ||
"jest": "^27.1.1", | ||
"memfs": "^3.2.4", | ||
@@ -48,0 +48,0 @@ "prettier": "^2.3.2", |
{ | ||
"name": "magic-comments-loader", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Add webpack magic comments to your dynamic imports during build time", | ||
@@ -46,3 +46,3 @@ "main": "dist", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^27.1.0", | ||
"jest": "^27.1.1", | ||
"memfs": "^3.2.4", | ||
@@ -49,0 +49,0 @@ "prettier": "^2.3.2", |
@@ -24,20 +24,2 @@ # [`magic-comments-loader`](https://www.npmjs.com/package/magic-comments-loader) | ||
Try *not* to have dynamic `import()` statements behind [comments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#comments). **It is better to remove unused code in production**. | ||
If you must, e.g. your comment is referencing usage of dynamic imports, then these styles are ok: | ||
```js | ||
// import('some-ignored-module') | ||
/* Some comment about a dynamic import('module') */ | ||
/** | ||
* Some multiline comment, only use one import() per line. | ||
* Comment about import('module/one') | ||
* Comment about import('module/two') | ||
* import('module/three'), etc. | ||
*/ | ||
``` | ||
This module uses a RegExp not a parser. If you would like to add better support for ignoring `import()` behind multiline comments please open a pull request. | ||
### Configuration | ||
@@ -44,0 +26,0 @@ |
31707
276