fix(core): react monorepo account for bundler (#14617)
This commit is contained in:
parent
3eb669b8b6
commit
d637a5ece8
@ -133,7 +133,7 @@ describe('create-nx-workspace', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('should be able to create an react workspace', () => {
|
||||
it('should be able to create a react workspace with webpack', () => {
|
||||
const wsName = uniq('react');
|
||||
const appName = uniq('app');
|
||||
|
||||
@ -151,6 +151,24 @@ describe('create-nx-workspace', () => {
|
||||
expect(packageJson.devDependencies['@nrwl/webpack']).toBeDefined();
|
||||
});
|
||||
|
||||
it('should be able to create a react workspace with vite', () => {
|
||||
const wsName = uniq('react');
|
||||
const appName = uniq('app');
|
||||
|
||||
runCreateWorkspace(wsName, {
|
||||
preset: 'react-monorepo',
|
||||
style: 'css',
|
||||
appName,
|
||||
packageManager,
|
||||
bundler: 'vite',
|
||||
});
|
||||
|
||||
expectNoAngularDevkit();
|
||||
const packageJson = readJson('package.json');
|
||||
expect(packageJson.devDependencies['@nrwl/webpack']).not.toBeDefined();
|
||||
expect(packageJson.devDependencies['@nrwl/vite']).toBeDefined();
|
||||
});
|
||||
|
||||
it('should be able to create an next workspace', () => {
|
||||
const wsName = uniq('next');
|
||||
const appName = uniq('app');
|
||||
|
||||
@ -53,7 +53,7 @@ async function createPreset(tree: Tree, options: Schema) {
|
||||
name: options.name,
|
||||
style: options.style,
|
||||
linter: options.linter,
|
||||
bundler: 'webpack',
|
||||
bundler: options.bundler ?? 'webpack',
|
||||
});
|
||||
} else if (options.preset === Preset.ReactStandalone) {
|
||||
const {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user