Skip to content

Commit 7ec0d63

Browse files
authored
feat: add missing assign import (#12)
* feat: add missing auto-import * refactor: remove unused var * chore: update playground example
1 parent bec8153 commit 7ec0d63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

playground/machines/loading.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export default createMachine({
22
id: 'loading',
33
initial: 'idle',
4+
predictableActionArguments: true,
45
states: {
56
idle: {
67
on: {

src/parts/autoImports.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { defineUnimportPreset } from 'unimport'
44
export const setupAutoImports = (isMinimal: boolean) => {
55
const nuxt = useNuxt()
66

7-
const isDev = nuxt.options.dev
8-
97
nuxt.hook('autoImports:sources', (presets) => {
108
// If minimal options is enabled import required
119
// things from @xstate/vue/lib/fsm or @xstate/fsm
@@ -43,7 +41,8 @@ export const setupAutoImports = (isMinimal: boolean) => {
4341
}
4442

4543
const xStateImports = [
46-
'createMachine'
44+
'createMachine',
45+
'assign'
4746
]
4847

4948
const xStateComposables = [

0 commit comments

Comments
 (0)