Skip to content

Commit

Permalink
fix: webpack conversion script parsing lost
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxch committed Feb 2, 2023
1 parent 590308e commit ea0f022
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

[0.4.7]
- Fix: webpack conversion script parsing lost

[0.4.6]
- Fix: webpack parsing failed resulting in process termination[#12](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/12)

Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Make the vue script setup syntax support the name attribute

## CHANGELOG

[0.4.7]
- Fix: webpack conversion script parsing lost

[0.4.6]
- Fix: webpack parsing failed resulting in process termination[#12](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/12)

Expand All @@ -18,11 +21,6 @@ Make the vue script setup syntax support the name attribute
[0.4.1]
- Feature: suppot vite@4

[0.3.2]
- Fix: use more specific function types[#6](https://github.com/chenxch/unplugin-vue-setup-extend-plus/issues/6)
- Remove `fileName` mode (Because its performance is consistent with the performance of Vue itself, it is a repetitive thing.)

`For details, refer to Options and extendIgnore`

## Feature

Expand Down
4 changes: 2 additions & 2 deletions src/core/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export function supportScriptName(code: string, id: string, options: Options) {
if (name || inheritAttrs) {
str().appendLeft(
0,
`<script ${lang ? `lang="${lang}"` : ''}>
`<script${lang ? ` lang="${lang}"` : ''}>
import { defineComponent } from 'vue'
export default defineComponent({
${name ? `name: "${name}",` : ''}
${inheritAttrs ? `inheritAttrs: ${inheritAttrs !== 'false'},` : ''}
})
</script>\n`,
</script$>\n`,
)
}

Expand Down

0 comments on commit ea0f022

Please sign in to comment.