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
bundleroption to choose if thebuildtask should be run by Webpack or esbuild. You do not need to run thebuild,package, orregistertasks. 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.jsto your app's project directory and update theoutput.pathto match your project layout. Delete the existingbuildtarget configuration.b) If you chose the esbuild bundler option:
Copy the
buildtarget configuration from the generated app'sproject.jsonand replace the existingbuildtarget configuration in your app'sproject.json. Adjust the path configurations in thebuildtarget to match your project layout.Run
nx g @nx/workspace:remove --projectName=<genrated-forge-app>to remove the app generated in step 2.