Skip to content

Instantly share code, notes, and snippets.

@philipjfulcher
Created April 17, 2020 20:07
Show Gist options
  • Save philipjfulcher/7c5f1fd073935390c4dc32eeab30f7d9 to your computer and use it in GitHub Desktop.
Save philipjfulcher/7c5f1fd073935390c4dc32eeab30f7d9 to your computer and use it in GitHub Desktop.
Example build and serve commands for building AngularJS app with webpack in Nx
...
"build": {
"builder": "@nrwl/web:build",
"options": {
"outputPath": "dist/apps/realworld",
"index": "apps/realworld/src/index.html",
"main": "apps/realworld/src/main.ts",
"polyfills": "apps/realworld/src/polyfills.ts",
"tsConfig": "apps/realworld/tsconfig.app.json",
"assets": [
"apps/realworld/src/favicon.ico",
"apps/realworld/src/assets"
],
"styles": ["apps/realworld/src/styles.css"],
"scripts": [],
"webpackConfig": "apps/realworld/webpack.config",
"buildLibsFromSource": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/realworld/src/environments/environment.ts",
"with": "apps/realworld/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@nrwl/web:dev-server",
"options": {
"buildTarget": "realworld:build"
}
},
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment