Skip to content

Commit

Permalink
fix(ui): webpack logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jun 30, 2018
1 parent c8224de commit c2c5e37
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui-addon-webpack/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { clientAddonConfig } = require('@vue/cli-ui')

module.exports = {
...clientAddonConfig({
id: 'vue-webpack'
id: 'org.vue.webpack.client-addon'
// port: 8042
})
}
13 changes: 8 additions & 5 deletions packages/@vue/cli-ui/apollo-server/connectors/client-addons.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ function serve (req, res) {
const { id, 0: file } = req.params
const addon = findOne(decodeURIComponent(id))
if (addon && addon.path) {
const basePath = resolveModuleRoot(require.resolve(addon.path))
const resolvedPath = require.resolve(addon.path)
const basePath = resolveModuleRoot(resolvedPath)
if (basePath) {
res.sendFile(path.join(basePath, file))
return
} else {
res.status(404)
res.send(`File not found (resolved: ${resolvedPath}`)
}
} else {
res.status(404)
res.send(`Addon ${id} not found in loaded addons. Try opening a vue-cli project first?`)
}

res.status(404)
res.send(`Addon ${id} not found in loaded addons. Try opening a vue-cli project first?`)
}

module.exports = {
Expand Down

0 comments on commit c2c5e37

Please sign in to comment.