Skip to content

Commit

Permalink
fix(module): properly extend vueCompilerOptions
Browse files Browse the repository at this point in the history
The current implementation just sets `vueCompilerOptions`, potentially overriding a user defined `vueCompilerOptions`. With this change, only two values are set, while other potentially already existing values can be kept.
  • Loading branch information
dargmuesli committed Jun 17, 2024
1 parent 54f87e3 commit aea3fd5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ export default defineNuxtModule<ModuleOptions>({
nuxt.hook('prepare:types', (options) => {
options.tsConfig.include?.unshift('./typed-router/typed-router.d.ts');
if (moduleOptions.pathCheck) {
(options.tsConfig as any).vueCompilerOptions = {
jsxTemplates: true,
experimentalRfc436: true,
};
(options.tsConfig as any).vueCompilerOptions = (options.tsConfig as any).vueCompilerOptions || {};
options.tsConfig.vueCompilerOptions.jsxTemplates = true;
options.tsConfig.vueCompilerOptions.experimentalRfc436 = true;
}
if (moduleOptions.removeNuxtDefs) {
removeNuxtDefinitions({
Expand Down

0 comments on commit aea3fd5

Please sign in to comment.