为什么在js中直接import less文件,报错说找不到模块
import common from './css/common.css'; import layer from './components/layer/layer.js'; import './css/module.less'; const App = function () { console.log(layer); } new App();
如果在css中引入就不会报错,但是只要这么引入就会报错 cannot find module 'less'