import-js / eslint-plugin-import

ESLint plugin with rules that help validate proper imports.
MIT License
5.57k stars 1.57k forks source link

Dynamic import required rule? #3098

Closed dmitryuk closed 2 weeks ago

dmitryuk commented 2 weeks ago

Hello. Didn't find a rule to prevent direct import instead dynamic import for some files, for example:

// It's BAD for that component
import RComp from './Comp.vue';

// GOOD
const RComp = () => import('./Comp.vue')

Thanks for your time

ljharb commented 2 weeks ago

I think this is a duplicate of #2326.