Skip to content

Commit 315b8b6

Browse files
committed
Fix components names on Windows
Fix #256
1 parent 032f57f commit 315b8b6

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"dependencies": {
5252
"circular-json-es6": "^2.0.0",
5353
"lodash.debounce": "^4.0.6",
54+
"path-browserify": "^0.0.0",
5455
"vue": "^2.0.0",
5556
"vuex": "^2.0.0"
5657
}

src/backend/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { highlight, unHighlight, getInstanceRect } from './highlighter'
55
import { initVuexBackend } from './vuex'
66
import { initEventsBackend } from './events'
77
import { stringify, classify, camelize } from '../util'
8+
import { basename } from 'path-browserify'
89

910
// hook should have been injected before this executes.
1011
const hook = window.__VUE_DEVTOOLS_GLOBAL_HOOK__
@@ -317,7 +318,7 @@ export function getInstanceName (instance) {
317318
}
318319
const file = instance.$options.__file // injected by vue-loader
319320
if (file) {
320-
return classify(require('path').basename(file).replace(/\.vue$/, ''))
321+
return classify(basename(file).replace(/\.vue$/, ''))
321322
}
322323
return instance.$root === instance
323324
? 'Root'

yarn.lock

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,7 @@ browserify-zlib@^0.1.4:
369369
dependencies:
370370
pako "~0.2.0"
371371

372-
browserslist@^1.0.1, browserslist@^1.5.2:
373-
version "1.7.0"
374-
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.0.tgz#738df5b2971354d198b2fbd5a22c560d2d896084"
375-
dependencies:
376-
caniuse-db "^1.0.30000617"
377-
electron-to-chromium "^1.2.1"
378-
379-
browserslist@~1.6.0:
372+
browserslist@^1.0.1, browserslist@^1.5.2, browserslist@~1.6.0:
380373
version "1.6.0"
381374
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.6.0.tgz#85fb7c993540d3fda31c282baf7f5aee698ac9ee"
382375
dependencies:
@@ -459,7 +452,7 @@ caniuse-api@^1.5.2:
459452
lodash.uniq "^4.3.0"
460453
shelljs "^0.7.0"
461454

462-
caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000613, caniuse-db@^1.0.30000617:
455+
caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000613:
463456
version "1.0.30000617"
464457
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000617.tgz#9b7fd81f58a35526315c83e60cb5f076f0beb392"
465458

@@ -1083,7 +1076,7 @@ ejs@~0.8.3:
10831076
version "0.8.8"
10841077
resolved "https://registry.yarnpkg.com/ejs/-/ejs-0.8.8.tgz#ffdc56dcc35d02926dd50ad13439bbc54061d598"
10851078

1086-
electron-to-chromium@^1.2.0, electron-to-chromium@^1.2.1:
1079+
electron-to-chromium@^1.2.0:
10871080
version "1.2.1"
10881081
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.1.tgz#63ac7579a1c5bedb296c8607621f2efc9a54b968"
10891082

@@ -2831,7 +2824,7 @@ parseurl@~1.3.1:
28312824
version "1.3.1"
28322825
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56"
28332826

2834-
2827+
[email protected], path-browserify@^0.0.0:
28352828
version "0.0.0"
28362829
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
28372830

0 commit comments

Comments
 (0)