vue Failed to compile with 2 errors:dependencies were not found
vue引入文件报错:Failed to compile with 2 errors:dependencies were not found
回答
vue-cli中alias没有~,css中可以使用~@指向设置的alias
// vue.config.jsconst path = require('path');
module.exports = {
configureWebpack: {
resolve: {
alias: {
'@lib': path.join(__dirname, 'lib'),
},
},
},
};
// app.js
import '@lib/form-xxxx';
以上是 vue Failed to compile with 2 errors:dependencies were not found 的全部内容, 来源链接: utcz.com/a/44693.html