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

feat: Remove --performance option from yarn rw build #10453

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changesets/10453.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- feat: Remove `--performance` option from `yarn rw build` (#10453) by @Josh-Walker-GM

This change removes the `--performance` flag from the `yarn rw build` command. It will no longer be available to use and the CLI will no longer accept this flag being passed in.

Additionally, the associated webpack config (`@redwoodjs/core/config/webpack.perf.js`) has been removed so it can no longer be imported if you were doing so.
6 changes: 0 additions & 6 deletions packages/cli/src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ export const builder = (yargs) => {
default: true,
description: 'Generate the Prisma client',
})
.option('performance', {
alias: 'perf',
type: 'boolean',
default: false,
description: 'Measure build performance',
})
.middleware(() => {
const check = checkNodeVersion()

Expand Down
14 changes: 0 additions & 14 deletions packages/cli/src/commands/buildHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { generatePrismaCommand } from '../lib/generatePrismaClient'
export const handler = async ({
side = ['api', 'web'],
verbose = false,
performance = false,
stats = false,
prisma = true,
prerender,
Expand All @@ -28,7 +27,6 @@ export const handler = async ({
command: 'build',
side: JSON.stringify(side),
verbose,
performance,
stats,
prisma,
prerender,
Expand All @@ -39,18 +37,6 @@ export const handler = async ({
const useFragments = rwjsConfig.graphql?.fragments
const useTrustedDocuments = rwjsConfig.graphql?.trustedDocuments

if (performance) {
console.log('Measuring Web Build Performance...')
execa.sync(
`yarn cross-env NODE_ENV=production webpack --config ${require.resolve(
'@redwoodjs/core/config/webpack.perf.js',
)}`,
{ stdio: 'inherit', shell: true, cwd: rwjsPaths.web.base },
)
// We do not want to continue building...
return
}

if (stats) {
console.log('Building Web Stats...')
execa.sync(
Expand Down
30 changes: 0 additions & 30 deletions packages/core/config/webpack.perf.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@redwoodjs/testing": "workspace:*",
"@redwoodjs/web-server": "workspace:*",
"babel-loader": "^9.1.3",
"babel-timing": "0.9.1",
"copy-webpack-plugin": "11.0.0",
"core-js": "3.36.1",
"css-loader": "6.10.0",
Expand Down
Loading
Loading