require图片报错Critical dependency: the request of a dependency is an expression

 下面的实例会报错

Critical dependency: the request of a dependency is an expression

原因是,require传入一个变量



解决方法,用模板字符串

 

你可能感兴趣的:(技术,require,图片报错)