Configure webpack on your Nx workspace

You can configure Webpack using a webpack.config.js file. If you do so, you can set the path to this file in your project.json file, in the build target options:

//... "my-app": { "targets": { //... "build": { "executor": "@nrwl/webpack:webpack", //... "options": { //... "webpackConfig": "apps/my-app/webpack.config.js" }, "configurations": { ... } }, } }

In that file, you can add the necessary configuration for Webpack. You can read more on how to configure webpack in the Webpack documentation.