Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MhMadHamster opened this issue Jun 29, 2020 · 1 comment
Open

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

MhMadHamster opened this issue Jun 29, 2020 · 1 comment

Comments

@MhMadHamster
Copy link
Contributor

MhMadHamster commented Jun 29, 2020

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

@ljharb
Copy link
Member

ljharb commented Jun 29, 2020

Looks like a duplicate of #1407; i'm not sure tho why it would have worked in v2.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants