Skip to content
Discussion options

You must be logged in to vote

While I played around with the reproducer for #3028, I was really surprised that it would work if I fix the imports thingy. So I digged deeper and seems like I found what was causing the issue

Problematic code:

import { defineStore } from 'pinia'

export const useTestStore = defineStore('test', () => {

Working code:

//import { defineStore } from 'pinia'

export const useTestStore = defineStore('test', () => {

Yes, if I remove import defineStore it starts working!

@posva do you really think it's not a bug? Did I miss some documentation saying "do not use imports in layers" or something similar?

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by okainov
Comment options

You must be logged in to vote
1 reply
@okainov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3032 on September 05, 2025 09:43.