diff --git a/README.md b/README.md index 96847d7..ddc7ac0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/index.ts b/src/index.ts index d2f20f4..67e9498 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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' diff --git a/src/volar.ts b/src/volar.ts index 659a595..4a7f9b3 100644 --- a/src/volar.ts +++ b/src/volar.ts @@ -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) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index e5d446c..d8e1a2d 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -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 () => {