Skip to content

Commit

Permalink
fix vue generators
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Aug 23, 2023
1 parent 2fb57f0 commit e34e1ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion code/lib/cli/src/generators/VUE/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { CoreBuilder } from '../../project_types';
import { detectBuilder } from '../../detect';
import { CoreBuilder, ProjectType } from '../../project_types';
import { baseGenerator } from '../baseGenerator';
import type { Generator } from '../types';

const generator: Generator = async (packageManager, npmOptions, options) => {
if (!options.builder) {
// eslint-disable-next-line no-param-reassign
options.builder = await detectBuilder(packageManager, ProjectType.VUE3);
}

const extraPackages = options.builder === CoreBuilder.Webpack5 ? ['vue-loader@^15.7.0'] : [];
await baseGenerator(packageManager, npmOptions, options, 'vue', {
extraPackages,
Expand Down
8 changes: 7 additions & 1 deletion code/lib/cli/src/generators/VUE3/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { CoreBuilder } from '../../project_types';
import { detectBuilder } from '../../detect';
import { CoreBuilder, ProjectType } from '../../project_types';
import { baseGenerator } from '../baseGenerator';
import type { Generator } from '../types';

const generator: Generator = async (packageManager, npmOptions, options) => {
if (!options.builder) {
// eslint-disable-next-line no-param-reassign
options.builder = await detectBuilder(packageManager, ProjectType.VUE3);
}

const extraPackages =
options.builder === CoreBuilder.Webpack5
? ['vue-loader@^17.0.0', '@vue/compiler-sfc@^3.2.0']
Expand Down

0 comments on commit e34e1ea

Please sign in to comment.