File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ class ConfigManager {
4444 this . _config = options ;
4545 }
4646
47+ get cmsConfigFile ( ) {
48+ return this . _cmsConfigFile ;
49+ }
50+
4751 get config ( ) {
4852 return this . _config ;
4953 }
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export default function NetlifyCmsModule(moduleOptions) {
119119
120120 // Start watching config file
121121 const patterns = [
122- Utils . r ( NETLIFY_CONFIG_FILE_NAME ) ,
122+ Utils . r ( configManager . cmsConfigFile . fileName ) ,
123123 Utils . r ( EXTENSIONS_DIR )
124124 ] ;
125125
@@ -128,10 +128,10 @@ export default function NetlifyCmsModule(moduleOptions) {
128128 ignoreInitial : true
129129 } ;
130130
131- const refreshFiles = _ . debounce (
132- ( ) => this . nuxt . renderer . netlifyWebpackDevMiddleware . invalidate ( ) ,
133- 200
134- ) ;
131+ const refreshFiles = _ . debounce ( ( ) => {
132+ configManager . cmsConfigFile . readFile ( ) ;
133+ this . nuxt . renderer . netlifyWebpackDevMiddleware . invalidate ( ) ;
134+ } , 200 ) ;
135135
136136 // Watch for src Files
137137 const fileWatcher = chokidar
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ class CmsConfig {
1616 get config ( ) {
1717 return this . _config ;
1818 }
19+
20+ get fileName ( ) {
21+ return this . _fileName ;
22+ }
1923}
2024
2125export default CmsConfig ;
You can’t perform that action at this time.
0 commit comments