Skip to content

Commit 8a37e2a

Browse files
committed
feat: upgrade volar plugin version
1 parent 8d08dfb commit 8a37e2a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ module.exports = {
8686
Use pascal case named exports in Vue SFC.
8787

8888
```ts
89-
import { MyComponent } from './MyComponent.vue'
90-
import { MyCard } from './my-card.vue'
9189
import { MyFooter } from './my_footer.vue'
90+
import { MyCard } from './my-card.vue'
91+
import { MyComponent } from './MyComponent.vue'
9292
```
9393

9494
### Options

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { createUnplugin } from 'unplugin'
2-
import { babelParse, getLang } from 'ast-kit'
31
import { createFilter } from '@rollup/pluginutils'
4-
import { MagicString, generateTransform } from 'magic-string-ast'
5-
import { type Options, resolveOption } from './core/options'
2+
import { babelParse, getLang } from 'ast-kit'
3+
import { generateTransform, MagicString } from 'magic-string-ast'
4+
import { createUnplugin } from 'unplugin'
5+
import { resolveOption, type Options } from './core/options'
66
import { resolveName } from './core/utils'
77
import type * as t from '@babel/types'
88

src/volar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { VueLanguagePlugin } from '@vue/language-core'
55
const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
66
return {
77
name: 'vue-named-export',
8-
version: 2,
8+
version: 2.1,
99
resolveEmbeddedCode(fileName, sfc, embeddedFile) {
1010
if (embeddedFile.id !== 'script_ts') return
1111
const exportedName = resolveName(fileName)

tests/basic.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import path from 'node:path'
2-
import { describe } from 'vitest'
32
import {
3+
rollupBuild,
44
RollupEsbuildPlugin,
55
RollupRemoveVueFilePathPlugin,
66
RollupVue,
7-
rollupBuild,
87
testFixtures,
98
} from '@vue-macros/test-utils'
9+
import { describe } from 'vitest'
1010
import VueNamedExport from '../src/vite'
1111

1212
describe('fixtures', async () => {

0 commit comments

Comments
 (0)