/
jsbundle.json
47 lines (30 loc) · 2.52 KB
/
jsbundle.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ # jsbundle config files are JSON files with hash-mark comments allowed.
"defaults": { # These are default options that may overridden by JSBUNDLE_ENV-specific options.
"entryFile": # The file where bundling should start. Also the first module executed when the bundle is executed.
"test/fixtures/abc.js", # Resolved relative to this config file. If this value is not defined, the "main" file
# from the package.json or a file named "index.js" will be used.
"devRequire": true, # Expose a window.devRequire function which allows requiring modules by name from the console.
"mangleNames": false, # Leave module ids as absolute file paths on the local filesystem.
# This will make the __filename variable behave as it does in Node.
# "mangleNames": false implies "devRequire": true if "devRequire" is not otherwise explicitly set.
"extraRequires": { # Modules to require in all of your modules. These will be added at the top of your modules as:
"_": "underscore" # "var <key> = require('<value>');". In this example, every module gets this line prepended:
# var _ = require('underscore');
# Extra requires are resolved relative to this config file. That is, as if this config file
}, # contained a require('<value>') statement.
"filters": [ # If a filter path begins with a '.', it is resolved relative to this config file.
"logger" # Otherwise, it is resolved relative to the jsbundle filters/ subdirectory.
],
"loggerLevel": "debug" # Filter out anything below "debug" logs (used by the logger filter).
# Possible values: off, error, warn, info, debug, trace.
},
"production": { # Options that only apply when the JSBUNDLE_ENV is "production".
"devRequire": false, # No window.devRequire function will be created.
"mangleNames": true, # Use numeric ids instead of absolute file paths for the module.ids.
"loggerLevel": "warn", # Filter out all but "error" and "warn" logs in production mode (used by the logger filter).
"loggerUrl": # Report logs to an external URL (used by the logger filter).
"logging.png?m=",
"bundleUrl": # Exposed in your code as module.bundleUrl.
"//s3.amazonaws.com/example/bundle.js"
}
}