-
Notifications
You must be signed in to change notification settings - Fork 2
configuration
/* global process:true */
var angularity = require('webpack-angularity-solution');
const PORT = 55555,
GLOBALS = {
$ : 'jquery',
jQuery : 'jquery',
'window.jQuery': 'jquery'
};
module.exports = angularity({globals: GLOBALS, port: PORT}, process.env)
.include(process.env.MODE) // app|test|release
.otherwise('app_test') // run app+test if MODE is unspecified
.resolve();Some explanation:
-
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