-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Open
Description
Environment
| Operating system | macOS 24.6.0 |
| CPU | Apple M1 Pro (8 cores) |
| Node.js version | v24.12.0 |
| nuxt/cli version | 3.31.2 |
| Package manager | [email protected] |
| Nuxt version | 4.2.2 |
| Nitro version | 2.12.9 |
| Builder | [email protected] |
| Config | compatibilityDate, devtools, ssr |
| Modules | - |
Reproduction
GitHub repo:
https://github.com/sasial-dev/nuxt-worker-import-repro
Steps:
- Run
nuxt dev - Open dev console
Something inspirationalshould be printed in the console- Run
nuxt build - Run
nuxt preview - Open dev console and the error
ReferenceError: useQuote is not definedwill be sighted.
Describe the bug
I have workers setup that import composables. These work prefectly in development mode, but when building my project for the first time I get a reference error that the imports for said composables have not been resolved. There should be no behaviour change between development and build mode.
Additional context
The composables internally use no nuxt-specific code, so they can be used across the client/other threads.
Logs
coderabbitai