-
Notifications
You must be signed in to change notification settings - Fork 2
configuration
A pro-forma configuration was provided in the project setup. We will now discuss its general form.
var angularity = require('webpack-angularity-solution');
module.exports = angularity(...options|factoryFn)
.include([modes])
.otherwise([defaultModes])
.resolve();The webpack-angularity-solution is based on webpack-multi-configurator. As such it has a number of defined builds that we will call modes.
The available modes include:
-
appBuilds compositions into
/app-builddirectory. -
releaseBuilds compositions into
/app-releasedirectory. Externalised chunk manifiest and embeds intoindex.html. -
testGenerates a
/app/test.jstest suite composed of all.spec.jsfiles. Builds test suite into/app-testdirectory.
-
Option
globalsNote that there are no globals in applications bundled by Webpack. If your code relies on globals such as jQuery, you will have to configure the
globalsoption as shown above.Add additional globals as required by your application.
Better practice may be to solve the problem at its source using module Shimming (see Shimming below).
-
Option
portBy default
--watchin theappmode will launch a BrowserSync server on port55555. You should override this port to some unique value so that your projects to no conflict with each other. -
Options by
process.envMore than one configuration may be passed to
angularity(). This meansprocess.envmay be passed in entirity (See environment variables below). -
The
include()andotherwise()methodsThe
include()statement runs either of the definedapp|test|releasecompilations where theMODEenvironment variable.Omission of
MODEimplies theotherwise()behavior, where bothappandtestcompilations will run. You should customise this default behavior to your taste.The
testmode is only meaningful if you have*.spec.jsfiles in your project.
-
Getting started
-
Reference
-
How it works