Skip to content

dynamic-import-chunkname does not allow additional comments #1840

@MhMadHamster

Description

@MhMadHamster

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions