Skip to content

Custom webpack config #61

Answered by studds
olegchursin asked this question in Q&A
Feb 2, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @olegchursin, yes there is, the webpackConfig option (which is the same as the option available on @nrwl/node:build:

angular.json / workspace.json:

"build": {
      "builder": "@nx-aws/sam:build",
      "options": {
          "outputPath": "dist/apps/api",
          "template": "apps/api/template.yaml",
          "tsConfig": "apps/api/tsconfig.app.json",
          "assets": ["apps/api/src/assets"],
          "webpackConfig": "apps/api/src/webpack.config.js",
          "sourceMap": true,
          "maxWorkers": 14
      }
  },

And then apps/api/src/webpack.config.js is a function which takes a webpack config, and returns the enhanced / replaced webpack config:

const { merge } = require('…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@olegchursin
Comment options

Answer selected by olegchursin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants