Skip to content

Commit 0eab0b8

Browse files
committed
fix: hotfix for Vue Volar support after update: keep config path updated
1 parent a3e4f55 commit 0eab0b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vueVolarSupport.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as vscode from 'vscode'
22
import { watchExtensionSettings } from '@zardoy/vscode-utils/build/settings'
33
import { extensionCtx, getExtensionSetting } from 'vscode-framework'
4-
import { join } from 'path-browserify'
54

65
export default () => {
6+
if (process.env.PLATFORM !== 'node') return
77
const handler = () => {
88
const config = vscode.workspace.getConfiguration('')
99
if (
@@ -27,6 +27,7 @@ const isConfigValueChanged = (id: string) => {
2727
const userValue = config.get<string>(id)
2828
if (userValue === config.inspect(id)!.defaultValue) return false
2929
// means that value was set by us programmatically, let's update it
30-
if (userValue?.startsWith(join(extensionCtx.extensionPath, '..'))) return false
30+
// eslint-disable-next-line @typescript-eslint/no-require-imports
31+
if (userValue?.startsWith(require('path').join(extensionCtx.extensionPath, '../..'))) return false
3132
return true
3233
}

0 commit comments

Comments
 (0)