Skip to content

Commit

Permalink
📝 update
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Dec 17, 2023
1 parent 3cea054 commit 0250bba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/rules/dynamic-import-chunkname.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ The following patterns are valid:
);
```

## `allowEmpty: true`
### `allowEmpty: true`

If you want to allow dynamic imports without a webpackChunkName, you can set `allowEmpty: true` in the rule config. This will allow dynamic imports without a leading comment, or with a leading comment that does not contain a webpackChunkName.

Given `{"allowEmpty": true}`:

<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
### valid

The following patterns are valid:
Expand All @@ -106,7 +107,7 @@ import(
'someModule',
);
```

<!-- markdownlint-disable-next-line MD024 -- duplicate header -->
### invalid

The following patterns are invalid:
Expand Down

0 comments on commit 0250bba

Please sign in to comment.