Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/mp-compiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ function resolveSrc (originComponents, components, resolveFn, context) {
resolveFn(context, originComponents[k], (err, realSrc) => {
if (err) return reject(err)
const com = covertCCVar(k)
const comName = getCompNameBySrc(realSrc)
const realComSrc = /\.js$/.test(realSrc)
? path.join(path.dirname(realSrc), `${com}.vue`)
: realSrc
const comName = getCompNameBySrc(realComSrc)
components[com] = { src: comName, name: comName }
resolve()
})
Expand Down