Skip to content

Commit

Permalink
feat(stark-build): merge webpack configurations into a single new web…
Browse files Browse the repository at this point in the history
…pack.config.js file

ISSUES CLOSED: #2558

BREAKING CHANGE:
  Simplify and improve integration of stark-build inside angular projects. Need to adapt "angular.json" file.

  Before:
  ```txt
  {
    //...
    "architect": {
      "build": {
        "builder": "@angular-builders/custom-webpack:browser",
        "options": {
          "customWebpackConfig": {
            "path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack-partial.dev.js",
            "mergeStrategies": {
              "modules.rules": "prepend",
              "plugins": "prepend",
              "devServer": "prepend",
              "replaceDuplicatePlugins": false
            }
          },
          // ...
        },
        "configurations": {
          // ...
          "production": {
            "customWebpackConfig": {
              "path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack-partial.prod.js",
              "mergeStrategies": {
                "modules.rules": "prepend",
                "plugins": "prepend",
                "replaceDuplicatePlugins": false
              }
            },
            // ...
          }
        }
      }
    }
  }
  ```

  After:
  ```txt
  {
    //...
    "architect": {
      "build": {
        "builder": "@angular-builders/custom-webpack:browser",
        "options": {
          "customWebpackConfig": {
            "path": "./node_modules/@nationalbankbelgium/stark-build/config/webpack.config.js"
            // mergeStrategies property is removed
          },
          // ...
        },
        "configurations": {
          // ...
          "production": {
            // "customWebpackConfig" property is removed
            // ...
          }
        }
      }
    }
  }
  ```
  • Loading branch information
SuperITMan committed Mar 23, 2021
1 parent 8a0d9c4 commit 7791bc2
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 344 deletions.
199 changes: 0 additions & 199 deletions packages/stark-build/config/webpack-partial.common.js

This file was deleted.

106 changes: 0 additions & 106 deletions packages/stark-build/config/webpack-partial.dev.js

This file was deleted.

24 changes: 0 additions & 24 deletions packages/stark-build/config/webpack-partial.prod.js

This file was deleted.

0 comments on commit 7791bc2

Please sign in to comment.