Skip to content

Commit

Permalink
feat: upgrade volar plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 9, 2024
1 parent 8d08dfb commit 8a37e2a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ module.exports = {
Use pascal case named exports in Vue SFC.

```ts
import { MyComponent } from './MyComponent.vue'
import { MyCard } from './my-card.vue'
import { MyFooter } from './my_footer.vue'
import { MyCard } from './my-card.vue'
import { MyComponent } from './MyComponent.vue'
```

### Options
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createUnplugin } from 'unplugin'
import { babelParse, getLang } from 'ast-kit'
import { createFilter } from '@rollup/pluginutils'
import { MagicString, generateTransform } from 'magic-string-ast'
import { type Options, resolveOption } from './core/options'
import { babelParse, getLang } from 'ast-kit'
import { generateTransform, MagicString } from 'magic-string-ast'
import { createUnplugin } from 'unplugin'
import { resolveOption, type Options } from './core/options'
import { resolveName } from './core/utils'
import type * as t from '@babel/types'

Expand Down
2 changes: 1 addition & 1 deletion src/volar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { VueLanguagePlugin } from '@vue/language-core'
const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
return {
name: 'vue-named-export',
version: 2,
version: 2.1,
resolveEmbeddedCode(fileName, sfc, embeddedFile) {
if (embeddedFile.id !== 'script_ts') return
const exportedName = resolveName(fileName)
Expand Down
4 changes: 2 additions & 2 deletions tests/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import path from 'node:path'
import { describe } from 'vitest'
import {
rollupBuild,
RollupEsbuildPlugin,
RollupRemoveVueFilePathPlugin,
RollupVue,
rollupBuild,
testFixtures,
} from '@vue-macros/test-utils'
import { describe } from 'vitest'
import VueNamedExport from '../src/vite'

describe('fixtures', async () => {
Expand Down

0 comments on commit 8a37e2a

Please sign in to comment.