import-js/eslint-plugin-import

webpackExports: ["namedExport"] is not supported for dynamic imports

Open

#2,306 opened on Nov 18, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (4,946 stars) (1,540 forks)batch import
enhancementhelp wanted

Description

Webpack 5 has some new magic comments allowing better tree-shaking. https://webpack.js.org/api/module-methods/#magic-comments

Currently, if a comment in the form /* webpackExports: ["namedExport"] */ is added to a dynamic import, eslint shows an error when checking with the import/dynamic-import-chunkname rule.

Contributor guide