by joe.pesch
28. February 2018 15:11
When compiling Angular 2 application I received compile warning "Critical dependency: the request of a dependency is an expression" when using the require() method with a variable vs. literal string value (see examples below).
This throws compile warning:
let path = 'path_to_item';
let item = require(path);
This does not throw compile warning:
let item = require('path_to_item');
0e1cb8c7-7709-4b09-9513-80c2c2cb3318|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
Angular