let dayjs = require('dayjs')
let relativeTime = require('dayjs/plugin/relativeTime.js')
dayjs.extend(relativeTime)
npm安装的dayjs,构建都是成功的,但是在页面引入dayjs的插件,页面报错
Error: module 'pages/matters/dayjs/plugin/relativeTime.js' is not defined, require args is 'dayjs/plugin/relativeTime.js'
require导入时,引入的路径变成了当前页面下的相对路径。要怎么处理好这个问题?