import-js/eslint-plugin-import
View on GitHub`dynamic-import-chunkname` does not allow additional comments
Open
#1,840 opened on Jun 29, 2020
help wanted
Repository metrics
- Stars
- (4,946 stars)
- PR merge metrics
- (Avg merge 138d 22h) (3 merged PRs in 30d)
Description
eslint: v7.3.1
eslint-plugin-import: v2.22.0
Eslint rule:
"rules": {
"import/dynamic-import-chunkname": "error",
}
Code:
import(
/* webpackInclude: /\.json$/ */
/* webpackChunkName: "module" */
"./module.js"
);
Produces error:
1:1 error dynamic imports require a leading comment in the form /* webpackChunkName: "[0-9a-zA-Z-_/.]+",? */ import/dynamic-import-chunkname
Version 2.21.2 works well