Skip to content

Commit 46dd855

Browse files
author
Guillaume Chau
committed
refactor(ui): use RDN on webpack client addon
1 parent 77fc6d9 commit 46dd855

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

packages/@vue/cli-ui-addon-webpack/src/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Vue.use(VueProgress, {
77
defaultShape: 'circle'
88
})
99

10-
ClientAddonApi.component('vue-webpack-dashboard', WebpackDashboard)
11-
ClientAddonApi.component('vue-webpack-analyzer', WebpackAnalyzer)
10+
ClientAddonApi.component('org.vue.webpack.components.dashboard', WebpackDashboard)
11+
ClientAddonApi.component('org.vue.webpack.components.analyzer', WebpackAnalyzer)
1212

13-
ClientAddonApi.addRoutes('vue-webpack', [
14-
{ path: '', name: 'test-webpack-route', component: TestView }
13+
ClientAddonApi.addRoutes('org.vue.webpack', [
14+
{ path: '', name: 'org.vue.webpack.routes.test', component: TestView }
1515
])
1616

1717
// Locales

packages/@vue/cli-ui/src/util/ClientAddonApi.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ export default class ClientAddonApi {
9393
}
9494

9595
export function toComponentId (id) {
96+
id = id.replace(/\./g, '-')
9697
return `client-addon--${id}`
9798
}

packages/@vue/cli-ui/ui-defaults/tasks.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,19 @@ module.exports = api => {
112112
const views = {
113113
views: [
114114
{
115-
id: 'vue-webpack-dashboard',
115+
id: 'org.vue.webpack.views.dashboard',
116116
label: 'org.vue.vue-webpack.dashboard.title',
117117
icon: 'dashboard',
118-
component: 'vue-webpack-dashboard'
118+
component: 'org.vue.webpack.components.dashboard'
119119
},
120120
{
121-
id: 'vue-webpack-analyzer',
121+
id: 'org.vue.webpack.views.analyzer',
122122
label: 'org.vue.vue-webpack.analyzer.title',
123123
icon: 'donut_large',
124-
component: 'vue-webpack-analyzer'
124+
component: 'org.vue.webpack.components.analyzer'
125125
}
126126
],
127-
defaultView: 'vue-webpack-dashboard'
127+
defaultView: 'org.vue.webpack.views.dashboard'
128128
}
129129
api.describeTask({
130130
match: /vue-cli-service serve(\s+--\S+(\s+\S+)?)*$/,
@@ -343,7 +343,7 @@ module.exports = api => {
343343

344344
// Webpack dashboard
345345
api.addClientAddon({
346-
id: 'vue-webpack',
346+
id: 'org.vue.webpack.client-addon',
347347
path: '@vue/cli-ui-addon-webpack/dist'
348348
})
349349

packages/@vue/cli-ui/vue-cli-ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ module.exports = api => {
1313

1414
// Add a test page below 'plugins', 'configurations' and 'tasks' on the left sidebar
1515
api.addView({
16-
id: 'vue-webpack-test-view',
17-
name: 'test-webpack-route',
16+
id: 'org.vue.webpack.views.test',
17+
name: 'org.vue.webpack.routes.test',
1818
// icon: 'pets',
1919
icon: '/public/webpack-logo.png',
2020
tooltip: 'Test view from webpack addon'

0 commit comments

Comments
 (0)