-
Notifications
You must be signed in to change notification settings - Fork 2
options
port : 55555, // port to serve during watch
unminified: false, // switch to unminified
names : 'app*, release', // list of compositions to include in the build
publicPath: undefined, // CDN path for release builds
globals : {}, // A hash of packages keyed by their global variable
stats : { // console output
hash : true,
version : true,
timings : true,
assets : true,
chunks : true,
modules : true,
reasons : true,
children : true,
source : true,
errors : true,
errorDetails: true,
warnings : true,
publicPath : true
}
In detail:
-
names
The format of the
names
option may be anArray
of strings, or a single comma separatedstring
.Names are the mode followed by a dot-delimted representation of the subdirectory of
/app
that the composition resides in. For example:- In app mode the root composition is named
"app"
. - In release mode the root composition is named
"release"
. - In app mode the composition
/app/foo
is named"app.foo"
. - In release mode the composition
/app/foo
is named"release.foo"
.
An asterix
*
may be used to match any trailing character. Meaning, for example, that:-
"*"
will include all compositions in both app and release modes, -
"app*"
will include all compositions in app mode and nothing in release mode,
- In app mode the root composition is named
These additional settings may be used to deviate from Angularity's optinionated project structure.
appDir : './app', // your composition roots
buildDir : './app-build', // output of the app build
testDir : './app-test', // output of the test build
releaseDir: './app-release', // output of the release build
testGlob : '**/*.spec.js' // identify your test files
All options may be parsed from uppercase keys and string values. This allows you to pass in environment variables without any additional parsing.
Use an underscrore to delimit camel-case, meaning buildDir
is written as environment variable BUILD_DIR
.
Use a double underscore to delimit a nested field, meaning stats.warnings
is written as environment variable STATS__WARNINGS
.
For example, to suppress warnings during the build:
{
"scripts": {
"silent": "cross-env STATS__WARNINGS=false webpack -d --progress"
}
}
-
Getting started
-
Reference
-
How it works