Skip to content

Commit

Permalink
[Packager] Add 'assetExts' to GlobalConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Sep 28, 2015
1 parent 5b2c9f1 commit 3922156
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packager/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ if (!fs.existsSync(path.resolve(__dirname, '..', 'node_modules'))) {

var chalk = require('chalk');
var connect = require('connect');
var globalConfig = require('./react-packager/src/GlobalConfig');
var ReactPackager = require('./react-packager');
var blacklist = require('./blacklist.js');
var checkNodeVersion = require('./checkNodeVersion');
Expand Down Expand Up @@ -197,7 +198,7 @@ function getAppMiddleware(options) {
cacheVersion: '2',
transformModulePath: transformerPath,
assetRoots: assetRoots,
assetExts: ['png', 'jpeg', 'jpg'],
assetExts: globalConfig.assetExts,
polyfillModuleNames: [
require.resolve(
'../Libraries/JavaScriptAppEngine/polyfills/document.js'
Expand Down
2 changes: 1 addition & 1 deletion packager/react-packager/src/GlobalConfig/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GlobalConfig.prototype = {
json = {};
}

// TODO: Set properties here with values taken from `json`
this.assetExts = json.assetExts || ['png', 'jpeg', 'jpg'];

log.moat(1);
log.format(this, { label: 'Global config: ', unlimited: true });
Expand Down

0 comments on commit 3922156

Please sign in to comment.