# no-dynamic-require > Disallow dynamic (non-literal) expressions in `require()` calls. ❕ **Suggestion** • ❌ **Recommended** • ❌ **Fixable** ## Details AMD loaders (RequireJS, etc.) can only statically analyze `require()` calls whose arguments are string literals or arrays of string literals. Using variables or expressions prevents static dependency detection and build-time optimization. ### ✅ Correct ```js require('foo'); ``` ```js require(['foo'], (foo) => {}); ``` ### ❌ Incorrect ```js const deps = ['foo']; require(deps, (foo) => {}); ``` ```js const id = 'some-id'; require([id], (m) => {}); ``` ## Introduced 1.0.0