Migrating to the package executor
Since plugin version 5.1.0, the existing build
executor has been deprecated in favor of a Nx native build in combination with the package
executor.
For all the details and motivation of this change refer to the discussion on GitHub.
Migration steps
Ensure you are on the latest plugin version by running:
nx add @toolsplus/nx-forge@latest
.Generate a new Forge app with the updated app generator. Make sure to set the
bundler
option to choose if thebuild
task should be run by Webpack or esbuild. You do not need to run thebuild
,package
, orregister
tasks. Generating this Forge app will ensure you have the correct dependencies installed and your workspace is configured to work with Webpack or esbuild.a) If you chose the Webpack bundler option (default):
Copy the
webpack.config.js
to your app's project directory and update theoutput.path
to match your project layout. Delete the existingbuild
target configuration.b) If you chose the esbuild bundler option:
Copy the
build
target configuration from the generated app'sproject.json
and replace the existingbuild
target configuration in your app'sproject.json
. Adjust the path configurations in thebuild
target to match your project layout.Run
nx g @nx/workspace:remove --projectName=<genrated-forge-app>
to remove the app generated in step 2.