mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 20:08:41 -05:00
fix(ui): client addons serve
This commit is contained in:
@@ -48,8 +48,8 @@ function getBasePath (filePath) {
|
||||
function serve (req, res) {
|
||||
const { id, 0: file } = req.params
|
||||
const addon = findOne(id)
|
||||
if (addon) {
|
||||
const basePath = getBasePath(require.resolve(addon.path || ''))
|
||||
if (addon && addon.path) {
|
||||
const basePath = getBasePath(require.resolve(addon.path))
|
||||
if (basePath) {
|
||||
res.sendFile(path.join(basePath, file))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user