Skip to content

Commit

Permalink
Merge pull request #169 from barnett617/patch-1
Browse files Browse the repository at this point in the history
fix: missing vue special method
  • Loading branch information
victorcuena authored Oct 24, 2024
2 parents d12844e + 3c6cdc3 commit 244b09e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/__tests__/vue-class-component/migrator-methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ describe('Methods Property Migration', () => {
created() {
console.log("OK");
}
beforeDestroy() {
console.log("beforeDestroy triggerd");
}
}`,
// Results
`import { defineComponent } from "vue";
export default defineComponent({
created() {
console.log("OK");
},
beforeDestroy() {
console.log("beforeDestroy triggerd");
}
})`,
);
Expand Down
1 change: 1 addition & 0 deletions src/migrator/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const vueSpecialMethods = [
'activated',
'deactivated',
'serverPrefetch',
'beforeDestroy',
'destroyed',
]; // Vue methods that won't be included under methods: {...}, they go to the root.

Expand Down

0 comments on commit 244b09e

Please sign in to comment.