mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 19:44:13 +00:00
[react-packager] Add asset extensions to file watch glob in the project root
This commit is contained in:
parent
1883ba535c
commit
2975f26e80
10
packager/react-packager/src/Server/index.js
vendored
10
packager/react-packager/src/Server/index.js
vendored
@ -71,13 +71,17 @@ function Server(options) {
|
||||
this._packages = Object.create(null);
|
||||
this._changeWatchers = [];
|
||||
|
||||
var assetGlobs = opts.assetExts.map(function(ext) {
|
||||
return '**/*.' + ext;
|
||||
});
|
||||
|
||||
var watchRootConfigs = opts.projectRoots.map(function(dir) {
|
||||
return {
|
||||
dir: dir,
|
||||
globs: [
|
||||
'**/*.js',
|
||||
'**/package.json',
|
||||
]
|
||||
].concat(assetGlobs),
|
||||
};
|
||||
});
|
||||
|
||||
@ -86,9 +90,7 @@ function Server(options) {
|
||||
opts.assetRoots.map(function(dir) {
|
||||
return {
|
||||
dir: dir,
|
||||
globs: opts.assetExts.map(function(ext) {
|
||||
return '**/*.' + ext;
|
||||
}),
|
||||
globs: assetGlobs,
|
||||
};
|
||||
})
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user