Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend vue-loader option types #21332

Closed
owlnai opened this issue Jun 2, 2023 · 0 comments · Fixed by #21363
Closed

Extend vue-loader option types #21332

owlnai opened this issue Jun 2, 2023 · 0 comments · Fixed by #21363

Comments

@owlnai
Copy link
Contributor

owlnai commented Jun 2, 2023

Environment

------------------------------
- Operating System: Linux
- Node Version:     v16.14.2
- Nuxt Version:     ^3.5.2
- Nitro Version:    2.4.1
- Package Manager:  npm@7.17.0
- Builder:          webpack
- User Config:      builder, webpack
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Reproduction

https://stackblitz.com/edit/nuxt-starter-6ue8jc?file=nuxt.config.ts

Describe the bug

Nuxt has a schema of vue-loader options that partially matches vue-loader.

For example, you can enable experimental features like Vue 3.3 defineModel in webpack.loaders.vue, but TypeScript won't recognize it as a valid property. However, if you ignore the error squiggles, it does work.
image

Additional context

Mentioned in #21303 (comment)

Logs

'{ defineModel: true; }' is not assignable to type '{ productionMode?: boolean | undefined; transformAssetUrls?: { video?: string | undefined; source?: string | undefined; object?: string | undefined; embed?: string | undefined; } | undefined; compilerOptions?: { ...; } | undefined; }'.
  Object literal may only specify known properties, and 'defineModel' does not exist in type '{ productionMode?: boolean | undefined; transformAssetUrls?: { video?: string | undefined; source?: string | undefined; object?: string | undefined; embed?: string | undefined; } | undefined; compilerOptions?: { ...; } | undefined; }'.(2322)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants