Compare commits

...

2 Commits

Author SHA1 Message Date
Victor Savkin 1444f585f4 chore(misc): publish 15.6.1 2023-01-24 09:21:53 -05:00
Katerina Skroumpelou 87443309b7 fix(bundling): react-standalone take into account bundler (#14573) 2023-01-24 09:19:34 -05:00
6 changed files with 24 additions and 3 deletions
@@ -32,7 +32,7 @@ describe('create-nx-workspace', () => {
checkFilesExist('project.json');
});
it('should create a workspace with a single react app at the root', () => {
it('should create a workspace with a single react app with vite at the root', () => {
const wsName = uniq('react');
runCreateWorkspace(wsName, {
@@ -45,6 +45,23 @@ describe('create-nx-workspace', () => {
checkFilesExist('package.json');
checkFilesExist('project.json');
checkFilesExist('vite.config.ts');
});
it('should create a workspace with a single react app with webpack at the root', () => {
const wsName = uniq('react');
runCreateWorkspace(wsName, {
preset: 'react-standalone',
appName: wsName,
style: 'css',
packageManager,
bundler: 'webpack',
});
checkFilesExist('package.json');
checkFilesExist('project.json');
checkFilesExist('webpack.config.js');
});
it('should be able to create an empty workspace built for apps', () => {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"packages": ["build/packages/*"],
"version": "15.6.0",
"version": "15.6.1",
"granularPathspec": false,
"command": {
"publish": {
@@ -241,6 +241,7 @@ async function main(parsedArgs: yargs.Arguments<Arguments>) {
skipGit,
commit,
framework,
bundler,
} = parsedArgs;
output.log({
@@ -266,6 +267,7 @@ async function main(parsedArgs: yargs.Arguments<Arguments>) {
nxCloud,
defaultBase,
framework,
bundler,
}
);
@@ -73,6 +73,7 @@ export function generatePreset(host: Tree, opts: NormalizedSchema) {
opts.linter ? `--linter=${opts.linter}` : null,
opts.npmScope ? `--npmScope=${opts.npmScope}` : `--npmScope=${opts.name}`,
opts.preset ? `--preset=${opts.preset}` : null,
opts.bundler ? `--bundler=${opts.bundler}` : null,
opts.framework ? `--framework=${opts.framework}` : null,
opts.packageManager ? `--packageManager=${opts.packageManager}` : null,
parsedArgs.interactive ? '--interactive=true' : '--interactive=false',
@@ -26,6 +26,7 @@ interface Schema {
defaultBase: string;
framework?: string;
linter?: Linter;
bundler?: 'vite' | 'webpack';
packageManager?: PackageManager;
}
@@ -71,7 +71,7 @@ async function createPreset(tree: Tree, options: Schema) {
rootProject: true,
bundler: options.bundler ?? 'vite',
e2eTestRunner: 'cypress',
unitTestRunner: 'vitest',
unitTestRunner: options.bundler === 'vite' ? 'vitest' : 'jest',
});
} else if (options.preset === Preset.NextJs) {
const { applicationGenerator: nextApplicationGenerator } = require('@nrwl' +